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

Method fetchText

src/service/xhr-impl.js:135–137  ·  view source on GitHub ↗

* Fetches a text response. Note this returns the response object, not the * response's text. #fetchText merely sets up the request to accept text. * * See https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch * * See `fetchAmpCors_` for more detail. * * @param {stri

(input, opt_init)

Source from the content-addressed store, hash-verified

133 * @return {!Promise<!Response>}
134 */
135 fetchText(input, opt_init) {
136 return this.fetch(input, setupInit(opt_init, 'text/plain'));
137 }
138
139 /**
140 * A substitute for the standard response.json(), which may optionally strip a prefix before calling JSON.parse().

Callers 11

fetchAdContentFunction · 0.80
test-xhr.jsFile · 0.80
constructorMethod · 0.80
fetchMethod · 0.80
fetchJwt_Method · 0.80
loadKeyPem_Method · 0.80
validateUrl_Method · 0.80
fetchCaptionsFunction · 0.80
getWorkerScript_Method · 0.80
fetchAuthorScript_Method · 0.80

Calls 2

fetchMethod · 0.95
setupInitFunction · 0.90

Tested by

no test coverage detected