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

Method requestHeaders

packages/decap-cms-backend-github/src/API.ts:310–322  ·  view source on GitHub ↗
(headers = {})

Source from the content-addressed store, hash-verified

308 }
309
310 requestHeaders(headers = {}) {
311 const baseHeader: Record<string, string> = {
312 'Content-Type': 'application/json; charset=utf-8',
313 ...headers,
314 };
315
316 if (this.token) {
317 baseHeader.Authorization = `${this.tokenKeyword} ${this.token}`;
318 return Promise.resolve(baseHeader);
319 }
320
321 return Promise.resolve(baseHeader);
322 }
323
324 parseJsonResponse(response: Response) {
325 return response.json().then(json => {

Callers 2

requestMethod · 0.95
requestAllPagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected