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: modify the return value of request.write() #18526

Closed
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
4 changes: 3 additions & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,9 @@ Defaults to `'utf8'`.
The `callback` argument is optional and will be called when this chunk of data
is flushed.

Returns `request`.
Returns `true` if the entire data was flushed successfully to the kernel
buffer. Returns `false` if all or part of the data was queued in user memory.
`'drain'` will be emitted when the buffer is free again.
Copy link
Member

Choose a reason for hiding this comment

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

Optional micro-nit: Should 'drain' link to the doc entry for that event?

Copy link
Member Author

@MoonBall MoonBall Feb 3, 2018

Choose a reason for hiding this comment

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

Firstly, the drain event of request is a little different from net.socket's 'drain' event because of the code. Secondly, there is no 'drain' item in this doc. Therefore, I don't know where the 'drain' should link to.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. :-D


## Class: http.Server
<!-- YAML
Expand Down