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

Method urlFor

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

Source from the content-addressed store, hash-verified

181 }
182
183 urlFor(path: string, options: Options) {
184 const params = [];
185 if (options.params) {
186 for (const key in options.params) {
187 params.push(`${key}=${encodeURIComponent(options.params[key] as string)}`);
188 }
189 }
190 if (params.length) {
191 path += `?${params.join('&')}`;
192 }
193 return this.apiRoot + path;
194 }
195
196 parseResponse(response: Response) {
197 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