MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / buildPipelineRequest

Function buildPipelineRequest

out/cli.cjs:77269–77292  ·  view source on GitHub ↗
(method, url2, options = {})

Source from the content-addressed store, hash-verified

77267 JSON.parse(body);
77268 return "application/json; charset=UTF-8";
77269 } catch (error) {
77270 return void 0;
77271 }
77272 }
77273 return "application/json; charset=UTF-8";
77274}
77275function buildPipelineRequest(method, url2, options = {}) {
77276 var _a5, _b2, _c2;
77277 const requestContentType = getRequestContentType(options);
77278 const { body, formData } = getRequestBody(options.body, requestContentType);
77279 const hasContent = body !== void 0 || formData !== void 0;
77280 const headers = createHttpHeaders(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c2 = (_a5 = options.accept) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2.accept) !== null && _c2 !== void 0 ? _c2 : "application/json" }), hasContent && requestContentType && {
77281 "content-type": requestContentType
77282 }));
77283 return createPipelineRequest({
77284 url: url2,
77285 method,
77286 body,
77287 formData,
77288 headers,
77289 allowInsecureConnection: options.allowInsecureConnection,
77290 tracingOptions: options.tracingOptions,
77291 abortSignal: options.abortSignal,
77292 onUploadProgress: options.onUploadProgress,
77293 onDownloadProgress: options.onDownloadProgress,
77294 timeout: options.timeout,
77295 enableBrowserStreams: true,

Callers 1

sendRequestFunction · 0.85

Calls 4

getRequestContentTypeFunction · 0.85
getRequestBodyFunction · 0.85
createHttpHeadersFunction · 0.85
createPipelineRequestFunction · 0.85

Tested by

no test coverage detected