MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / getAllResponseHeaders

Method getAllResponseHeaders

src/Fetch.js:117–128  ·  view source on GitHub ↗

* Returns a string containing all the response headers, separated by CRLF. * @returns {string} The response headers.

()

Source from the content-addressed store, hash-verified

115 * @returns {string} The response headers.
116 */
117 getAllResponseHeaders() {
118 if (!this._responseHeaders) {
119 return '';
120 }
121
122 let headersString = '';
123 // The Headers object is iterable.
124 for (const [key, value] of this._responseHeaders.entries()) {
125 headersString += `${key}: ${value}\r\n`;
126 }
127 return headersString;
128 }
129
130 /**
131 * Sends the request.

Callers 2

fetchGetResponseHeadersFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected