Skip to content

getJsonOrText ​

Overview ​

Fetches a URL and returns the response.

Signature ​

getJsonOrText(response)

Parameters ​

NameTypeRequiredDescription
responseResponseyesThe object to convert.

Returns ​

Promise

Either the JSON data or the text data.

Source ​

client/lib/utils/fetchSupport.js:14