Minor Changes
-
#2119
2b62548
Thanks @tim-smart! - add Scope to Http clientThis change adds a scope to the default http client, ensuring connections are
cleaned up if you abort the request at any point.Some response helpers have been added to reduce the noise.
import * as Http from "@effect/platform/HttpClient"; import { Effect } from "effect"; // instead of Http.request.get("/").pipe( Http.client.fetchOk(), Effect.flatMap((_) => _.json), Effect.scoped, ); // you can do Http.request.get("/").pipe(Http.client.fetchOk(), Http.response.json); // other helpers include Http.response.text; Http.response.stream; Http.response.arrayBuffer; Http.response.urlParamsBody; Http.response.formData; Http.response.schema * Effect;
Patch Changes
- Updated dependencies [
2b62548
]:- @effect/platform@0.45.0
- @effect/platform-node-shared@0.1.8