MCPcopy Create free account
hub / github.com/decaporg/decap-cms / urlFor

Method urlFor

packages/decap-cms-backend-github/src/API.ts:309–320  ·  view source on GitHub ↗
(path: string, options: Options)

Source from the content-addressed store, hash-verified

307 }
308
309 urlFor(path: string, options: Options) {
310 const params = [];
311 if (options.params) {
312 for (const key in options.params) {
313 params.push(`${key}=${encodeURIComponent(options.params[key] as string)}`);
314 }
315 }
316 if (params.length) {
317 path += `?${params.join('&')}`;
318 }
319 return this.apiRoot + path;
320 }
321
322 parseResponse(response: Response) {
323 const contentType = response.headers.get('Content-Type');

Callers 2

requestMethod · 0.95
requestAllPagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected