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

Method requestHeaders

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

Source from the content-addressed store, hash-verified

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

Callers 3

requestMethod · 0.95
requestAllPagesMethod · 0.95
getIssueWithETagMethod · 0.95

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected