MCPcopy Create free account
hub / github.com/angular/dev-infra / request

Function request

github-actions/bazel/configure-remote/configure-remote.js:10172–10189  ·  view source on GitHub ↗
(opts, callback)

Source from the content-addressed store, hash-verified

10170 }
10171 const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers;
10172 const contentType = parsedHeaders["content-type"];
10173 const contentLength = parsedHeaders["content-length"];
10174 const res = new Readable({
10175 resume,
10176 abort,
10177 contentType,
10178 contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null,
10179 highWaterMark
10180 });
10181 if (this.removeAbortListener) {
10182 res.on("close", this.removeAbortListener);
10183 }
10184 this.callback = null;
10185 this.res = res;
10186 if (callback !== null) {
10187 if (this.throwOnError && statusCode >= 400) {
10188 this.runInAsyncScope(
10189 getResolveErrorBodyCallback,
10190 null,
10191 { callback, body: res, contentType, statusCode, statusMessage, headers }
10192 );

Callers

nothing calls this directly

Calls 1

dispatchMethod · 0.45

Tested by

no test coverage detected