mirror of
https://github.com/usebruno/bruno.git
synced 2025-03-02 00:21:25 +01:00
28 lines
432 B
JavaScript
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;
|