mirror of
https://github.com/Wessel/wumpfetch.git
synced 2026-06-06 07:35:42 +02:00
Add WumpResponse#buffer
- Added a buffer function - Add `WumpRequest#buffer` in typings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user