| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@nodejs/documentation |
Sorry, something went wrong.
There was a problem hiding this comment.
Strictly speaking, async functions return nothing. Isn't that the case here?
Sorry, something went wrong.
There was a problem hiding this comment.
The documentation states:
A socket/stream can be supplied in one of two ways: by returning the socket/stream from this function, or by passing the socket/stream to callback.
So it's not a "true" async or sync function. Indeed, the code explicitly supports both sync and async usage:
const newSocket = self.createConnection(options, oncreate);
if (newSocket)
oncreate(null, newSocket);
Sorry, something went wrong.
There was a problem hiding this comment.
Okay, in that case, can we atleast specify that the callback is optional?
Sorry, something went wrong.
There was a problem hiding this comment.
It is, as shown in the function signature:
### agent.createConnection(options[, callback])
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks for putting in the effort to do this!
Sorry, something went wrong.
There was a problem hiding this comment.
This is not 100% true, I stumbled upon this the other day. There are cases where socket.setTimeout() is called even if the socket is not connected.
Anyway it's probably better to investigate/fix this in another issue/PR.
Sorry, something went wrong.
There was a problem hiding this comment.
This should be 'request'.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
I really appreciate the effort that has been put here, thanks. |
Sorry, something went wrong.
http.md 1585:1-1585:38 warning Found unused definition no-unused-definitions remark-lint ⚠ 1 warning This definition became unused: [`Buffer`]: buffer.html#buffer_buffer |
Sorry, something went wrong.
|
Ping @TimothyGu ... can you take a look at @ChALkeR's most recent comment. |
Sorry, something went wrong.
It is emitted by the Server, analogous to the `'checkContinue'` event, not by the ClientRequest.
|
Ping? |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
PR-URL: #8486 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #8486 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #8486 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
I've landed this in v6.x-staging. Please let me know if there is anything in here that is specific to v7 and should not be included |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
doc
Description of change
The current documentation for the http module still follows an older format. Type documentation for parameters were also incomplete. This pull request at least fills up the type information for parameters and returns, so that the parsed JSON is usable.