MCPcopy
hub / github.com/di-sukharev/opencommit / apiVersionPolicy

Function apiVersionPolicy

out/cli.cjs:77147–77158  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

77145 return response;
77146 }
77147 }
77148 };
77149}
77150
77151// node_modules/@azure-rest/core-client/dist/esm/apiVersionPolicy.js
77152var apiVersionPolicyName = "ApiVersionPolicy";
77153function apiVersionPolicy(options) {
77154 return {
77155 name: apiVersionPolicyName,
77156 sendRequest: (req, next) => {
77157 const url2 = new URL(req.url);
77158 if (!url2.searchParams.get("api-version") && options.apiVersion) {
77159 req.url = `${req.url}${Array.from(url2.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`;
77160 }
77161 return next(req);

Callers 1

createDefaultPipelineFunction · 0.85

Calls 4

nextFunction · 0.85
getMethod · 0.45
fromMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…