Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix http.createServer for versions before v9.6.0 #24856

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 14 additions & 5 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1808,13 +1808,22 @@ 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([options][, requestListener])
## http.createServer([requestListener])
<!-- YAML
added: v0.1.13
changes:
- version: v9.6.0
pr-url: https://github.com/nodejs/node/pull/15752
description: The `options` argument is supported now.
-->
- `requestListener` {Function}

* Returns: {http.Server}

Returns a new instance of [`http.Server`][].

The `requestListener` is a function which is automatically
added to the [`'request'`][] event.

## http.createServer([options][, requestListener])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 8.x-staging, you'll need to remove this stuff too. This function signature doesn't work on 8.x, which is what this doc change is fixing.

<!-- YAML
added: v9.6.0
-->
* `options` {Object}
* `IncomingMessage` {http.IncomingMessage} Specifies the `IncomingMessage`
Expand Down