Skip to content

doc: type improvement of file http.md, outgoingMessage.setHeader and outgoingMessage.getHeader section #58189

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ added: v0.4.0
-->

* `name` {string}
* Returns: {any}
* Returns: {number | string | string\[] | undefined}

Reads out a header that's already been queued but not sent to the client.
The name is case-insensitive. The type of the return value depends
Expand Down Expand Up @@ -2220,7 +2220,7 @@ added: v0.4.0
-->

* `name` {string}
* `value` {any}
* `value` {number | string | string\[]}
* Returns: {http.ServerResponse}

Returns the response object.
Expand Down Expand Up @@ -3171,7 +3171,7 @@ added: v0.4.0
-->

* `name` {string} Name of header
* Returns: {string | undefined}
* Returns: {number | string | string\[] | undefined}

Gets the value of the HTTP header with the given name. If that header is not
set, the returned value will be `undefined`.
Expand Down Expand Up @@ -3273,7 +3273,7 @@ added: v0.4.0
-->

* `name` {string} Header name
* `value` {any} Header value
* `value` {number | string | string\[]} Header value
* Returns: {this}

Sets a single header value. If the header already exists in the to-be-sent
Expand Down
Loading