MCPcopy
hub / github.com/expressjs/body-parser / raw

Function raw

lib/types/raw.js:30–42  ·  view source on GitHub ↗

* Create a middleware to parse raw bodies. * * @param {Object} [options] * @returns {Function} * @public

(options)

Source from the content-addressed store, hash-verified

28 * @public
29 */
30function raw (options) {
31 const normalizedOptions = normalizeOptions(options, 'application/octet-stream')
32
33 const readOptions = {
34 ...normalizedOptions,
35 // Skip charset validation and parse the body as is
36 skipCharset: true
37 }
38
39 return function rawParser (req, res, next) {
40 read(req, res, next, passthrough, debug, readOptions)
41 }
42}

Callers

nothing calls this directly

Calls 2

normalizeOptionsFunction · 0.85
readFunction · 0.85

Tested by

no test coverage detected