import { CaseInsensitiveStringMap, MapStringTo, OptionalPropertyOf } from "../base-types"; import { RequestMessage } from "./request-message"; /** * A response message that will be returned by {@link IInternalClient} instances. */ export declare class ResponseMessage { /** * Headers containing additional information sent by the server. */ readonly responseHeaders: CaseInsensitiveStringMap; /** * Status code indicating whether the request was successful or not. */ readonly statusCode: number; /** * A textual representation of the current status. */ readonly statusText?: string; /** * A reason explaining why the request failed. */ readonly reasonPhrase?: string; /** * The request that led to this response. */ readonly requestMessage?: RequestMessage; /** * The content (or body) that was returned. */ readonly content?: T; /** * Indicates if the response is successful. */ get isSuccessStatusCode(): boolean; private constructor(); /** * Build a response message. * @param statusCode - HTTP status code * @param responseHeaders - Headers containing additional information sent by the server * @param optional - Object with more response properties (statusText, content, ...) */ static build(statusCode: number, responseHeaders?: MapStringTo, optional?: { [key in OptionalPropertyOf]?: any; }): ResponseMessage; }