MCPcopy Index your code
hub / github.com/Effect-TS/effect / schemaNoBody

Function schemaNoBody

packages/platform/src/internal/httpClientResponse.ts:181–195  ·  view source on GitHub ↗
(schema: Schema.Schema<A, I, R>, options?: ParseOptions | undefined)

Source from the content-addressed store, hash-verified

179
180/** @internal */
181export const schemaNoBody = <
182 R,
183 I extends {
184 readonly status?: number | undefined
185 readonly headers?: Readonly<Record<string, string>> | undefined
186 },
187 A
188>(schema: Schema.Schema<A, I, R>, options?: ParseOptions | undefined) => {
189 const parse = Schema.decodeUnknown(schema, options)
190 return (self: ClientResponse.HttpClientResponse): Effect.Effect<A, ParseResult.ParseError, R> =>
191 parse({
192 status: self.status,
193 headers: self.headers
194 })
195}
196
197/** @internal */
198export const stream = <E, R>(effect: Effect.Effect<ClientResponse.HttpClientResponse, E, R>) =>

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected