| 179 | |
| 180 | /** @internal */ |
| 181 | export 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 */ |
| 198 | export const stream = <E, R>(effect: Effect.Effect<ClientResponse.HttpClientResponse, E, R>) => |