dragonroll/backend/node_modules/@smithy/protocol-http/dist-es/httpResponse.js

15 lines
435 B
JavaScript
Raw Normal View History

2024-09-21 17:08:36 +00:00
export class HttpResponse {
constructor(options) {
this.statusCode = options.statusCode;
this.reason = options.reason;
this.headers = options.headers || {};
this.body = options.body;
}
static isInstance(response) {
if (!response)
return false;
const resp = response;
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
}
}