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

Method urlFor

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

Source from the content-addressed store, hash-verified

332 }
333
334 urlFor(path: string, options: Options) {
335 const params = [];
336 if (options.params) {
337 for (const key in options.params) {
338 params.push(`${key}=${encodeURIComponent(options.params[key] as string)}`);
339 }
340 }
341 if (params.length) {
342 path += `?${params.join('&')}`;
343 }
344 return this.apiRoot + path;
345 }
346
347 parseResponse(response: Response) {
348 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