mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Remove redundant methods from Body class
This patch: - removes Body.arrayBuffer. This method is redundant since there's already a Body.buffer() method - removes Body.bodyUsed getter. References #106
This commit is contained in:
@@ -156,13 +156,6 @@ class Body {
|
||||
return this._contentPromise;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
get bodyUsed() {
|
||||
return !!this._contentPromise;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Promise<string>}
|
||||
*/
|
||||
@@ -178,14 +171,6 @@ class Body {
|
||||
let content = await this.text();
|
||||
return JSON.parse(content);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Promise<!ArrayBuffer>}
|
||||
*/
|
||||
async arrayBuffer() {
|
||||
let content = await this.buffer();
|
||||
return content.buffer;
|
||||
}
|
||||
}
|
||||
helper.tracePublicAPI(Body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user