import { ISerializablePayload, SerializablePayload, SerializablePayloadOptions } from './SerializablePayload.js';
import { IProperty } from './Property.js';
import { HeadersArray } from './HeadersArray.js';
export declare const Kind = "Core#HttpRequest";
export interface IBaseHttpRequest extends ISerializablePayload {
    /**
     * The request URL
     */
    url: string;
    /**
     * HTTP method name
     * Defaults to "GET".
     */
    method?: string;
    /**
     * HTTP headers string
     */
    headers?: string;
}
/**
 * The most basic HTTP request.
 */
export interface IHttpRequest extends IBaseHttpRequest {
    kind?: string;
    /**
     * Headers model, if any.
     * When reading headers string, the value of `headers` is preferred over the model.
     */
    headersModel?: IProperty[];
    /**
     * Optional meta of the payload
     */
    payloadOptions?: SerializablePayloadOptions;
}
/**
 * The base model of an HTTP request.
 *
 * **Note about the payload.**
 *
 * The payload is **always** stored in the request object in its serialized form.
 * Use the `readPayload()` to read the correct data type and the `writePayload()` to
 * safely store the payload.
 */
export declare class HttpRequest extends SerializablePayload {
    kind: string;
    /**
     * The request URL
     */
    url: string;
    /**
     * HTTP method name.
     * Defaults to "GET".
     */
    method: string;
    /**
     * HTTP headers string
     */
    headers?: string;
    /**
     * Headers model, if any.
     * When reading headers string, the value of `headers` is preferred over the model.
     */
    headersModel?: HeadersArray;
    static fromBaseValues(values: IBaseHttpRequest): HttpRequest;
    /**
     * @param input The request definition used to restore the state.
     */
    constructor(input?: string | IHttpRequest);
    /**
     * Creates a new request clearing anything that is so far defined.
     *
     * Note, this throws an error when the object is not a request.
     */
    new(init: IHttpRequest): void;
    /**
     * Checks whether the input is a definition of an HTTP request.
     */
    static isHttpRequest(input: unknown): boolean;
    toJSON(): IHttpRequest;
    /**
     * It reads headers from the request.
     * It prefers `headers` string over `headersModel` so set only the model
     * if the application should only use model.
     * @returns The HTTP headers string from the current headers.
     */
    toHeadersString(): string;
}
//# sourceMappingURL=HttpRequest.d.ts.map