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

Function toBodyCodec

packages/effect/src/http-api/HttpApiClient.ts:1596–1602  ·  view source on GitHub ↗
(schema: Schema.Constraint)

Source from the content-addressed store, hash-verified

1594}
1595
1596function toBodyCodec(schema: Schema.Constraint): Schema.Top {
1597 return fromArrayBuffer(schema).pipe(Schema.decodeTo(
1598 HttpApiSchema.getResponseEncoding(schema.ast)._tag === "FormUrlEncoded"
1599 ? Schema.toCodecArrayFromSingle(schema)
1600 : schema
1601 ))
1602}
1603
1604function fromArrayBuffer(schema: Schema.Constraint): Schema.Top {
1605 const encoding = HttpApiSchema.getResponseEncoding(schema.ast)

Callers 1

HttpApiClient.tsFile · 0.85

Calls 2

fromArrayBufferFunction · 0.85
pipeMethod · 0.65

Tested by

no test coverage detected