Bones/node_modules/popsicle/dist/response.d.ts
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

27 lines
708 B
TypeScript

import Base, { BaseOptions, Headers, RawHeaders } from './base';
import Request from './request';
import PopsicleError from './error';
export interface ResponseOptions extends BaseOptions {
body: any;
status: number;
statusText: string;
}
export interface ResponseJSON {
headers: Headers;
rawHeaders: RawHeaders;
body: any;
url: string;
status: number;
statusText: string;
}
export default class Response extends Base {
status: number;
statusText: string;
body: any;
request: Request;
constructor(options: ResponseOptions);
statusType(): number;
error(message: string, type: string, error?: Error): PopsicleError;
toJSON(): ResponseJSON;
}