Repository navigation
[HTTP/2.0][WIP] H2 server documentation - #12655
Conversation
jgraham
left a comment
There was a problem hiding this comment.
Generally this seems good, just some minor comments.
| These instructions assume you are already familiar with the testing | ||
| infrastructure and know how to write a standard HTTP/1.1 test. | ||
|
|
||
| Ontop of the standard `main` handler that the H1 server offers, the |
| The server now has a prototype HTTP/2.0 server which gives you access to | ||
| some of the HTTP/2.0 specific functionality. Currently, the server is off | ||
| by default and needs to be run using `./wpt serve --h2` in order to enable it. | ||
| To find out more about the new Python handlers introduced head over to |
There was a problem hiding this comment.
"head over to" seems a little colloquial. I would say something like "The HTTP 2 server supports handlers that work per-frame; these are documented in […]".
| ## Response Writer API ## | ||
|
|
||
| ##### `write_headers(self, headers, status_code, status_message=None, stream_id=None, last=False):` | ||
| Send a HEADER frame that is tracked by the local state machine. |
There was a problem hiding this comment.
I'm not sure these one sentence summaries of the two sentence descriptions are adding much.
| @@ -0,0 +1,113 @@ | |||
| ## Response Writer API ## | |||
|
|
|||
| ##### `write_headers(self, headers, status_code, status_message=None, stream_id=None, last=False):` | |||
There was a problem hiding this comment.
This header level seems very low; is there prededent somewhere else in the docs?
There was a problem hiding this comment.
As far as I can see, there is no precedent for this kind of API documentation. There are some js API docs but those are mostly showing a block of code and explaining what they do by the looks of it. I can bump it up a level or two?
There was a problem hiding this comment.
Yeah, see if that looks better.
8a82848 to
a71343a
Compare
…l Handler explanation and how to use new functionality
a71343a to
07bfccc
Compare
|
Looks great, thanks! docs/_writing-tests/h2responsewriter.md should probably have a pointer back to the main API discussion, or maybe be inlined there? An example or two for that section would also be nice. |
|
@annevk do you mean the API discussion that is open on GitHub? |
|
No, I meant to docs/_writing-tests/h2tests.md. |
|
Ahh thought so, just checking :) I think inlining the responsewriter API into h2tests.md would make a lot of sense, @jgraham thoughts? |
|
Yeah, that could work. |
Added documentation for H2ResponseWriter API as well as a more general Handler explanation and how to use new functionality
I've written some documentation for the majority of the H2ResponseWriter API aswell as a general overview of how the new frame handlers work and how to use them. Still need to cover a few more functions in the API. Otherwise I'm not quite sure what is missing, thoughts?