UNPKG

pluto-http-client

Version:

HTTP client for NodeJS. Inspired in the Java JAX-RS spec so you can expect excellence, versatility and extensibility.

33 lines (32 loc) 1.24 kB
/// <reference types="node" /> import { MediaType } from "../media-type"; import { MultiValueMap } from "../../utils/collections"; import { Cookie } from "../cookie"; import { MultiValueMapType } from "../header"; import { Readable, Transform, Writable } from "stream"; import { Unmarshal } from "../../framework/unmarshal"; import { EntityTag } from "../entity-tag"; import { ResponseContext, StatusType } from "../response"; export declare class NodeResponse implements ResponseContext { private _headers; private response; private _statusCode; private _reader; private _mediaType?; private _cookies?; private _etag?; constructor(_headers: MultiValueMapType, response: Readable, _statusCode?: number); getHeaders(): MultiValueMapType; getCookies(): MultiValueMap<Cookie>; getDate(): Date | undefined; getHeaderString(key: string): string; getLastModified(): Date | undefined; getMediaType(): MediaType | undefined; getEtag(): EntityTag | undefined; getStatus(): number; getStatusInfo(): StatusType; readEntity<T>(unmarshaller: Unmarshal<T>): Promise<T>; readEntity(writable: Writable): Writable; pipe(transformer: Transform): void; close(): void; }