@effect-aws/http-handler
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@effect-aws/http-handler

npm version npm downloads

This package provides the effectful HttpHandler implementation for the AWS SDK v3, allowing developers to control HttpClient request handler usage in effect platform way for better tracing and error handling.

Installation

npm install --save @effect-aws/http-handler

Usage

import { S3 } from "@effect-aws/client-s3"
import { HttpHandler } from "@effect-aws/http-handler"
import { FetchHttpClient } from "@effect/platform"

const program = S3.headObject(args)

const result = pipe(
  program,
  Effect.provide(S3.defaultLayer),
  Effect.provide(HttpHandler.layer({ requestTimeout: 1000 })),
  Effect.provide(FetchHttpClient.layer),
  Effect.runPromise
)

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/http-handler

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

26.5 kB

Total Files

32

Last publish

Collaborators

  • f1oyd