parseGerritJsonResponse()
Home > @backstage/integration
> parseGerritJsonResponse
Parse the json response from Gerrit and strip the magic prefix.
Signature:
function parseGerritJsonResponse(response: Response): Promise<unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
response | Response | An API response. |
Returns:
Promise<unknown>
Remarks
To prevent against XSSI attacks the JSON response body from Gerrit starts with a magic prefix that must be stripped before it can be fed to a JSON parser.