diff --git a/doc/api/http.md b/doc/api/http.md index 8af25b4e02ef..5326ca180bb3 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1721,11 +1721,30 @@ A collection of all the standard HTTP response status codes, and the short description of each. For example, `http.STATUS_CODES[404] === 'Not Found'`. -## http.createServer([requestListener]) +## http.createServer([options][, requestListener]) -- `requestListener` {Function} +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/31448 + description: The `insecureHTTPParser` option is supported now. + - version: v9.6.0, v8.12.0 + pr-url: https://github.com/nodejs/node/pull/15752 + description: The `options` argument is supported now. +--> + +* `options` {Object} + * `IncomingMessage` {http.IncomingMessage} Specifies the `IncomingMessage` + class to be used. Useful for extending the original `IncomingMessage`. + **Default:** `IncomingMessage`. + * `ServerResponse` {http.ServerResponse} Specifies the `ServerResponse` class + to be used. Useful for extending the original `ServerResponse`. **Default:** + `ServerResponse`. + * `insecureHTTPParser` {boolean} Use an insecure HTTP parser that accepts + invalid HTTP headers when `true`. Using the insecure parser should be + avoided. See [`--insecure-http-parser`][] for more information. + **Default:** `false` +* `requestListener` {Function} * Returns: {http.Server} @@ -1820,6 +1839,9 @@ Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option.