MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / dispatchRequest

Function dispatchRequest

out/cli.cjs:73830–73864  ·  view source on GitHub ↗
(config8)

Source from the content-addressed store, hash-verified

73828function throwIfCancellationRequested(config8) {
73829 if (config8.cancelToken) {
73830 config8.cancelToken.throwIfRequested();
73831 }
73832 if (config8.signal && config8.signal.aborted) {
73833 throw new CanceledError_default(null, config8);
73834 }
73835}
73836function dispatchRequest(config8) {
73837 throwIfCancellationRequested(config8);
73838 config8.headers = AxiosHeaders_default.from(config8.headers);
73839 config8.data = transformData.call(
73840 config8,
73841 config8.transformRequest
73842 );
73843 if (["post", "put", "patch"].indexOf(config8.method) !== -1) {
73844 config8.headers.setContentType("application/x-www-form-urlencoded", false);
73845 }
73846 const adapter = adapters_default.getAdapter(config8.adapter || defaults_default.adapter);
73847 return adapter(config8).then(function onAdapterResolution(response) {
73848 throwIfCancellationRequested(config8);
73849 response.data = transformData.call(
73850 config8,
73851 config8.transformResponse,
73852 response
73853 );
73854 response.headers = AxiosHeaders_default.from(response.headers);
73855 return response;
73856 }, function onAdapterRejection(reason) {
73857 if (!isCancel(reason)) {
73858 throwIfCancellationRequested(config8);
73859 if (reason && reason.response) {
73860 reason.response.data = transformData.call(
73861 config8,
73862 config8.transformResponse,
73863 reason.response
73864 );
73865 reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
73866 }
73867 }

Callers

nothing calls this directly

Calls 4

isCancelFunction · 0.85
thenMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…