Request.functions.readJson
Function: readJson()
Section titled “Function: readJson()”readJson(
self):Effect<unknown,MalformedJsonError,never>
Defined in: packages/fx-fetch/src/Request/readJson.ts:21
Reads the body of a Request as JSON.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Effect<unknown, MalformedJsonError, never>
Example
Section titled “Example”import { Request } from 'fx-fetch';import { Effect } from 'effect';
const request = Request.make({ url: 'https://api.example.com', method: 'POST' });const json = await Effect.runPromise(Request.readJson(request));0.1.0