bruno/packages/bruno-js/src/bruno-response.js

28 lines
492 B
JavaScript
Raw Normal View History

2023-01-29 00:19:31 +01:00
class BrunoResponse {
constructor(response) {
this._response = response;
this.status = response.status;
this.statusText = response.statusText;
this.headers = response.headers;
this.body = response.data;
2023-01-29 00:19:31 +01:00
}
getStatus() {
return this._response.status;
}
getHeader(name) {
return this._response.header[name];
}
getHeaders() {
return this._response.headers;
}
getBody() {
2023-01-29 00:19:31 +01:00
return this._response.data;
}
}
module.exports = BrunoResponse;