(request: HttpServerRequest, body: unknown)
| 865 | } |
| 866 | |
| 867 | const rawBodyStream = (request: HttpServerRequest, body: unknown): Stream.Stream<Uint8Array, HttpServerError> => { |
| 868 | if (body instanceof Request) { |
| 869 | return streamFromReadable(request, body.body) |
| 870 | } |
| 871 | if (isReadableStream(body)) { |
| 872 | return streamFromReadable(request, body) |
| 873 | } |
| 874 | if (isBodyInit(body)) { |
| 875 | return streamFromReadable(request, new Response(body).body) |
| 876 | } |
| 877 | return Stream.fail(requestParseError(request, "Unsupported body type")) |
| 878 | } |
| 879 | |
| 880 | const rawBodyBytes = (request: HttpServerRequest, body: unknown): Effect.Effect<Uint8Array, HttpServerError> => { |
| 881 | if (body instanceof Request) { |
no test coverage detected