Automatically decompress message body if necessary.
HTTP headers.
Optional
options: UploadOptionsGet async iterator for uploaded files from message body.
Optional
options: UploadOptions// Iterate over uploaded files
for await (const {fieldname, file, filename} of body.files()) {
const parts = [];
for await (const chunk of file) {
parts.push(chunk);
}
const content = Buffer.concat(parts).toString();
console.write(`${fieldname}: ${content}`);
}
Get form parameters from message body.
Optional
options: UploadOptions// Get a specific parameter
const params = await body.form();
const foo = params.get('foo');
Get JSON message body as parsed data structure.
Generated using TypeDoc
HTTP message body base class.