(request, response)
| 31 | }; |
| 32 | |
| 33 | const echoMultipartBody: Handler = async (request, response) => { |
| 34 | const body = await parse(request); |
| 35 | const entries = await Promise.all([...body.entries()].map<Promise<[BodyEntryPath, BodyEntryRawValue]>>(async ([name, value]) => [name, isBodyFile(value) ? await value.text() : value])); |
| 36 | |
| 37 | response.json(Body.json(entries)); |
| 38 | }; |
| 39 | |
| 40 | test('GET cannot have body without the `allowGetBody` option', withServer, async (t, server, got) => { |
| 41 | server.post('/', defaultEndpoint); |
nothing calls this directly
no test coverage detected
searching dependent graphs…