MCPcopy Index your code
hub / github.com/github-tools/github / __getURL

Method __getURL

lib/Requestable.js:73–82  ·  view source on GitHub ↗

* Compute the URL to use to make a request. * @private * @param {string} path - either a URL relative to the API base or an absolute URL * @return {string} - the URL to use

(path)

Source from the content-addressed store, hash-verified

71 * @return {string} - the URL to use
72 */
73 __getURL(path) {
74 let url = path;
75
76 if (path.indexOf('//') === -1) {
77 url = this.__apiBase + path;
78 }
79
80 let newCacheBuster = 'timestamp=' + new Date().getTime();
81 return url.replace(/(timestamp=\d+)/, newCacheBuster);
82 }
83
84 /**
85 * Compute the headers required for an API request.

Callers 1

_requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected