@wordpress/api-fetch
Version:
Utility to make WordPress REST API requests.
10 lines • 448 B
TypeScript
/**
* Parses a response, throwing an error if parsing the response fails.
*
* @param {Response} response
* @param {boolean} shouldParseResponse
* @return {Promise<any>} Parsed response.
*/
export function parseAndThrowError(response: Response, shouldParseResponse?: boolean): Promise<any>;
export function parseResponseAndNormalizeError(response: Response, shouldParseResponse?: boolean): Promise<any>;
//# sourceMappingURL=response.d.ts.map