MCPcopy
hub / github.com/ampproject/amphtml / drainText_

Method drainText_

src/polyfills/fetch.js:152–156  ·  view source on GitHub ↗

* Drains the response and returns the text. * @return {!Promise } * @private

()

Source from the content-addressed store, hash-verified

150 * @private
151 */
152 drainText_() {
153 devAssert(!this.bodyUsed, 'Body already used');
154 this.bodyUsed = true;
155 return Promise.resolve(this.xhr_.responseText);
156 }
157
158 /**
159 * Drains the response and returns a promise that resolves with the response

Callers 3

textMethod · 0.95
jsonMethod · 0.95
arrayBufferMethod · 0.95

Calls 2

devAssertFunction · 0.90
resolveMethod · 0.80

Tested by

no test coverage detected