Parses the request body and returns it in a promise.
options
are the following:
parse
: (required) booleanoutput
: (required) 'data', 'stream', 'file'maxBytes
: intmaxParts
: intoverride
: stringdefaultContentType
: stringallow
: string, only allow a certain media typetimeout
: integer, limit time spent buffering requestqs
: object, to pass into the qs moduleuploads
: string, directory for file uploadsdecoders
: an object mapping content-encoding names to their corresponding decoder functionscompression
: an object mapping content-encoding names to their corresponding options passed to the decoders
functionsreturns the following:
payload
: the parsed payload, or null if no payloadmime
: the content type of the request