UNPKG

535 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.HttpResponse = void 0;
4class HttpResponse {
5 constructor(options) {
6 this.statusCode = options.statusCode;
7 this.headers = options.headers || {};
8 this.body = options.body;
9 }
10 static isInstance(response) {
11 if (!response)
12 return false;
13 const resp = response;
14 return typeof resp.statusCode === "number" && typeof resp.headers === "object";
15 }
16}
17exports.HttpResponse = HttpResponse;