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

Function decode

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

Source from the content-addressed store, hash-verified

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

Callers 4

Sse.test.tsFile · 0.50
Rpc.test.tsFile · 0.50

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected