Is your feature request related to a problem? Please describe.
The http2.Http2ServerRequest has some useful properties that are undocumented. But IMHO, they should be part of the public API.
Describe the solution you'd like
The following properties could become part of the http2 module documentation:
method, authority, scheme, url
(See lib/internal/http2/compat.js)
Describe alternatives you've considered
The alternative is to use the headers object:
// alternative to: req.authority
req.headers[':authority']
PR?
If these properties should be documented and therefore part of the public API, I am happy to create the corresponding documentation in a PR.
@nodejs/documentation @nodejs/http2
Looks like method and url are documented. Still needs authority and scheme. I don't see nay reason these shouldn't be documented.
@Trott Point me in the right direct and I'd take this on asap.
@kenigbolo I think the documentation of Http2ServerRequest.method is a good example. And the source of the documentation is at doc/api/http2.md.
And the contributing guide for PRs is a good starting point. But for a "documentation only" PR there is no need to compile and test node itself. It should be enough to test the documentation with make test-doc (instead of a full ./configure && make -j4 test).
And if make test-doc fails with "Could not find executable. Should be out/Release/node" you can link to your global node as a temporary fix:
mkdir out/Release && ln -s `which node` out/Release/node
@mgjm Thanks a lot. I'd get on it today. Can this be assigned to me?
Most helpful comment
@kenigbolo I think the documentation of
Http2ServerRequest.methodis a good example. And the source of the documentation is atdoc/api/http2.md.And the contributing guide for PRs is a good starting point. But for a "documentation only" PR there is no need to compile and test node itself. It should be enough to test the documentation with
make test-doc(instead of a full./configure && make -j4 test).And if
make test-docfails with "Could not find executable. Should be out/Release/node" you can link to your global node as a temporary fix:mkdir out/Release && ln -s `which node` out/Release/node