Function: fetchJSON() ​
fetchJSON<
T>(url,method,headers):Effect<T,FetchError|ResponseParseError>
Defined in: packages/fetch-one-api-page/src/index.ts:103
Fetch JSON data from a URL.
Type Parameters ​
T ​
T
Parameters ​
url ​
URL
The URL to fetch
method ​
"GET" | "POST" | "PUT" | "DELETE"
The HTTP method to use
headers ​
Headers
The headers to include in the request
Returns ​
Effect<T, FetchError | ResponseParseError>
The JSON response from the server