( schema: Schema.ConstraintCodec<A, I, RD, unknown>, options?: ParseOptions | undefined )
| 193 | * @since 4.0.0 |
| 194 | */ |
| 195 | export const schemaCookies = <A, I extends Readonly<Record<string, string | undefined>>, RD>( |
| 196 | schema: Schema.ConstraintCodec<A, I, RD, unknown>, |
| 197 | options?: ParseOptions | undefined |
| 198 | ): Effect.Effect<A, Schema.SchemaError, RD | HttpServerRequest> => { |
| 199 | const parse = Schema.decodeUnknownEffect(schema) |
| 200 | return Effect.flatMap(HttpServerRequest, (req) => parse(req.cookies, options)) |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Decodes a schema from the headers of the current request. |