/// import * as http from "http"; import * as https from "https"; import { TwirpError } from "./errors"; export interface Rpc { request(service: string, method: string, contentType: "application/json" | "application/protobuf", data: object | Uint8Array): Promise; } export declare type HttpClientOptions = Omit & { baseUrl: string; }; /** * a node HTTP RPC implementation * @param options * @constructor */ export declare const NodeHttpRPC: (options: HttpClientOptions) => Rpc; export declare function wrapErrorResponseToTwirpError(errorResponse: string): TwirpError; export declare type FetchRPCOptions = Omit & { baseUrl: string; }; /** * a browser fetch RPC implementation */ export declare const FetchRPC: (options: FetchRPCOptions) => Rpc;