import { Transport, Serializer, Message } from "multi-rpc-common"; export declare class HTTPError extends Error { status: Number; body?: any; constructor(status: Number, body?: any); } export declare class NoUrlPresent extends Error { constructor(); } /** * A client-side transport that uses HTTP as its protocol. */ export default class HTTPClientTransport extends Transport { protected serializer: Serializer; protected url?: string; headers: Map; /** * Creates a HTTP transport that connects to a server at a specified url. * @param serializer - The serializer to use for encoding/decoding messages. * @param url - Url of the server to connect to (e.g. "http://localhost"). */ constructor(serializer: Serializer, url?: string, headers?: Map); /** * Sends a message to the server, connecting to the server if a connection has not been made. * @param message - Message to send. * @async * @throws {NoUrlPresent} - If url is not present. * @throws {HTTPError} - If an HTTP error occurs. */ send(message: Message): Promise; }