import { binary, url } from '@synnaxlabs/x'; import { z } from 'zod'; import { FileOptions, FileTransport, UploadBody } from './file'; import { MiddlewareCollector } from './middleware'; import { UnaryClient } from './unary'; export declare const CONTENT_TYPE_HEADER_KEY = "Content-Type"; /** * The prefix freighter servers require on query-string parameters that should be * exposed to handlers as request params. Unprefixed query parameters are ignored so * arbitrary query strings never leak into the request context. */ export declare const FREIGHTER_METADATA_PREFIX = "freighterctx"; /** * HTTPClientFactory provides a POST and GET implementation of the Unary protocol. * @param url - The base URL of the API. * @param encoder - The encoder/decoder to use for the request/response. */ export declare class HTTPClient extends MiddlewareCollector implements UnaryClient, FileTransport { endpoint: url.URL; encoder: binary.Codec; constructor(endpoint: url.URL, encoder: binary.Codec, secure?: boolean); private get defaultHeaders(); send(target: string, req: z.input | z.infer, reqSchema: RQ, resSchema: RS): Promise>; upload(target: string, body: UploadBody, options: FileOptions

, resSchema: RS): Promise>; download(target: string, req: z.input | z.infer, reqSchema: RQ, options: FileOptions

): Promise>; private context; private fetch; private decodeError; } //# sourceMappingURL=http.d.ts.map