formdata

ModuleServer-Side

HTTP multipart/form-data parser

Documentation

formdatarequestRequestonPartPartCallbackcallbackerrornumbernulloptionsParseOptionsdataArrayBufferremainingnumber

Initializes a form-data encoded body handler for http request streams. Returning this handler function from inside the RequestCallback function of an http server initiates parsing of the multipart/form-data-encoded request body. onPart will be called for every request part (i.e., form field), including its body (or portion thereof), headers, and name (if present in the headers). onPart may be called again with more body content and the same headers and name. callback is issued when request processing is complete and a response is required. If an error occurred, the error argument is its HTTP status code.

PartCallbackbodyArrayBufferheadersobjectnamestringnull
ParseOptionsmaxHeaderSize8192number