github Effect-TS/effect @effect/platform-browser@0.30.0

latest releases: @effect/sql-sqlite-wasm@0.21.1, @effect/sql-sqlite-bun@0.21.8, @effect/sql-libsql@0.9.8...
9 months ago

Minor Changes

  • #2119 2b62548 Thanks @tim-smart! - add Scope to Http client

    This 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

Don't miss a new effect release

NewReleases is sending notifications on new releases.