MCPcopy Create free account
hub / github.com/Effect-TS/effect / decode

Function decode

packages/effect/test/httpapi/HttpApiSecurity.test.ts:7–14  ·  view source on GitHub ↗
(authorization: string, security: Security)

Source from the content-addressed store, hash-verified

5import { HttpApiBuilder, HttpApiClient, HttpApiSecurity } from "effect/http-api"
6
7const decode = <Security extends HttpApiSecurity.HttpApiSecurity>(authorization: string, security: Security) =>
8 HttpApiBuilder.securityDecode(security).pipe(
9 Effect.provideService(
10 HttpServerRequest.HttpServerRequest,
11 HttpServerRequest.fromWeb(new Request("http://localhost/", { headers: { authorization } }))
12 ),
13 Effect.provideService(HttpServerRequest.ParsedSearchParams, {})
14 )
15
16describe("HttpApiSecurity", () => {
17 describe("securityDecode", () => {

Callers 1

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected