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

Function userAgentPolicy

out/cli.cjs:75611–75622  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

75609 const defaultAgent = getUserAgentString(runtimeInfo);
75610 const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;
75611 return userAgentValue;
75612}
75613
75614// node_modules/@azure/core-rest-pipeline/dist/esm/policies/userAgentPolicy.js
75615var UserAgentHeaderName = getUserAgentHeaderName();
75616var userAgentPolicyName = "userAgentPolicy";
75617function userAgentPolicy(options = {}) {
75618 const userAgentValue = getUserAgentValue(options.userAgentPrefix);
75619 return {
75620 name: userAgentPolicyName,
75621 async sendRequest(request3, next) {
75622 if (!request3.headers.has(UserAgentHeaderName)) {
75623 request3.headers.set(UserAgentHeaderName, userAgentValue);
75624 }
75625 return next(request3);

Callers 1

Calls 1

getUserAgentValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…