Node: Documentation for Http2ServerRequest properties

Created on 23 Oct 2018  路  5Comments  路  Source: nodejs/node

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.

doc help wanted http2

Most helpful comment

@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

All 5 comments

@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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevenvachon picture stevenvachon  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments

cong88 picture cong88  路  3Comments

addaleax picture addaleax  路  3Comments