bruno/packages/bruno-js/src/bruno-response.js
2023-02-07 02:12:23 +05:30

28 lines
432 B
JavaScript

class BrunoResponse {
constructor(res) {
this.res = res;
this.status = res.status;
this.statusText = res.statusText;
this.headers = res.headers;
this.body = res.data;
}
getStatus() {
return this.res.status;
}
getHeader(name) {
return this.res.header[name];
}
getHeaders() {
return this.res.headers;
}
getBody() {
return this.res.data;
}
}
module.exports = BrunoResponse;