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

Function parseJsonResponse

packages/decap-cms-lib-util/src/API.ts:43–49  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

41}
42
43async function parseJsonResponse(response: Response) {
44 const json = await response.json();
45 if (!response.ok) {
46 return Promise.reject(json);
47 }
48 return json;
49}
50
51export function parseResponse(response: Response) {
52 const contentType = response.headers.get('Content-Type');

Callers 1

parseResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected