import { Headers } from '../../../lib/headers/Headers.js';
import { IHttpRequest } from '../../../models/HttpRequest.js';
import { type Logger, type ILogObj } from '../../../lib/logging/index.js';
export interface MessageBuilderOptions {
    logger: Logger<ILogObj>;
    request: IHttpRequest;
    hasProxy: boolean;
    isProxyTunnel: boolean;
    hostHeader?: string;
}
export interface MessageBuilderContext {
    headers: Headers;
    buffer?: Buffer;
    statusLine: string;
    hostHeader?: string;
}
/**
 * Builds HTTP messages for requests
 */
export declare class MessageBuilder {
    private logger;
    private request;
    private hasProxy;
    private isProxyTunnel;
    private hostHeader?;
    private hostTestReg;
    constructor(options: MessageBuilderOptions);
    /**
     * Builds a complete HTTP message
     */
    buildMessage(headers: Headers, buffer?: Buffer): Buffer;
    /**
     * Creates the message context with all components
     */
    private createMessageContext;
    /**
     * Assembles the complete HTTP message from components
     */
    private assembleMessage;
    /**
     * Creates the HTTP status line
     */
    private createStatusLine;
    /**
     * Determines if a host header is required and returns it
     */
    private getHostHeader;
    /**
     * Tests if current connection is required to add `host` header.
     * It returns `false` only if `host` header has been already provided.
     */
    private hostRequired;
    /**
     * Updates the host header for the message builder
     */
    updateHostHeader(hostHeader: string): void;
    /**
     * Creates a status line for a specific request
     */
    createStatusLineForRequest(request: IHttpRequest, hasProxy: boolean, isProxyTunnel: boolean): string;
    /**
     * Validates if a request needs a host header
     */
    static hostRequiredForRequest(request: IHttpRequest): boolean;
}
//# sourceMappingURL=MessageBuilder.d.ts.map