/** @packageDocumentation * @module RpcInterface */ import "@ungap/url-search-params/index"; import { RpcInterface } from "../../RpcInterface"; import { RpcContentType } from "../core/RpcConstants"; import { RpcSerializedValue } from "../core/RpcMarshaling"; import { RpcRequestFulfillment, SerializedRpcRequest } from "../core/RpcProtocol"; import { RpcRequest } from "../core/RpcRequest"; import { HttpServerRequest, HttpServerResponse, WebAppRpcProtocol } from "./WebAppRpcProtocol"; /** @public */ export declare type HttpMethod_T = "get" | "put" | "post" | "delete" | "options" | "head" | "patch" | "trace"; /** A web application RPC request. * @public */ export declare class WebAppRpcRequest extends RpcRequest { private _loading; private _request; private _pathSuffix; private get _headers(); /** The maximum size permitted for an encoded component in a URL. * @note This is used for features like encoding the payload of a cacheable request in the URL. */ static maxUrlComponentSize: number; /** The HTTP method for this request. */ method: HttpMethod_T; /** Convenience access to the protocol of this request. */ readonly protocol: WebAppRpcProtocol; /** Standardized access to metadata about the request (useful for purposes such as logging). */ metadata: { status: number; message: string; }; /** Parse headers */ private static parseHeaders; /** Parses a request. */ static parseRequest(protocol: WebAppRpcProtocol, req: HttpServerRequest): Promise; /** Sends the response for a web request. */ static sendResponse(protocol: WebAppRpcProtocol, request: SerializedRpcRequest, fulfillment: RpcRequestFulfillment, res: HttpServerResponse): void; /** Determines the most efficient transport type for an RPC value. */ protected static computeTransportType(value: RpcSerializedValue, source: any): RpcContentType; /** Constructs a web application request. */ constructor(client: RpcInterface, operation: string, parameters: any[]); /** @internal */ preflight(): Promise; protected isHeaderAvailable(name: string): boolean; /** Sets request header values. */ protected setHeader(name: string, value: string): void; /** Sends the request. */ protected send(): Promise; protected computeRetryAfter(attempts: number): number; protected handleUnknownResponse(code: number): void; protected load(): Promise; /** Override to supply an alternate fetch function. */ protected supplyFetch(): typeof fetch; /** Override to supply an alternate Request function. */ protected supplyRequest(): typeof Request; private static configureResponse; private static sendText; private static sendBinary; private static sendMultipart; private static sendStream; private static parseFromPath; private static parseFromBody; private performFetch; private loadText; private loadBinary; private loadMultipart; private setupTransport; private setupBinaryTransport; private setupMultipartTransport; private setupTextTransport; } //# sourceMappingURL=WebAppRpcRequest.d.ts.map