1 | import { IncomingHttpHeaders } from 'http';
|
2 | /**
|
3 | * A response from a web request
|
4 | */
|
5 | declare class Response<TBody> {
|
6 | readonly statusCode: number;
|
7 | readonly headers: IncomingHttpHeaders;
|
8 | readonly body: TBody;
|
9 | readonly url: string;
|
10 | constructor(statusCode: number, headers: IncomingHttpHeaders, body: TBody, url: string);
|
11 | isError(): boolean;
|
12 | getBody(encoding: string): string;
|
13 | getBody(): TBody;
|
14 | }
|
15 | export = Response;
|