Add WumpResponse#buffer

- Added a buffer function
- Add `WumpRequest#buffer` in typings
This commit is contained in:
August (Chris)
2019-04-21 10:00:20 -07:00
committed by GitHub
parent 3106d113e1
commit 3cbbff8a26

View File

@@ -10,6 +10,10 @@ module.exports = class WumpResponse {
_addChunk (chunk) {
this.body = Buffer.concat([ this.body, chunk ]);
}
buffer () {
return this.body;
}
text () {
return this.body.toString();
@@ -18,4 +22,4 @@ module.exports = class WumpResponse {
json () {
return JSON.parse(this.body);
}
};
};