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

Function response

packages/effect/test/httpapi/HttpApiClient.test.ts:1016–1023  ·  view source on GitHub ↗
(status: number)

Source from the content-addressed store, hash-verified

1014 )
1015 const decode = HttpApiClient.decodeResponse(Api, { group: "test", endpoint: "form" })
1016 const response = (status: number) =>
1017 HttpClientResponse.fromWeb(
1018 HttpClientRequest.get("http://test/form"),
1019 new Response("tags=a&note=x", {
1020 status,
1021 headers: { "content-type": "application/x-www-form-urlencoded", "x-count": "1" }
1022 })
1023 )
1024
1025 assert.deepStrictEqual(
1026 yield* decode(response(200)),

Callers 2

clientFromResponseFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected