mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Document 2.2 changes and the new stream_trailers function
This commit is contained in:
parent
17719a136d
commit
4c22bdbcb7
7 changed files with 208 additions and 5 deletions
|
@ -114,8 +114,8 @@ Initiate a response to the client.
|
|||
----
|
||||
|
||||
This initiates a response to the client. The stream
|
||||
will end when a data command with the `fin` flag is
|
||||
returned.
|
||||
will end when a data command with the `fin` flag or
|
||||
a trailer command is returned.
|
||||
|
||||
[[data_command]]
|
||||
=== data
|
||||
|
@ -127,6 +127,16 @@ Send data to the client.
|
|||
{data, fin(), iodata()}
|
||||
----
|
||||
|
||||
[[trailers_command]]
|
||||
=== trailers
|
||||
|
||||
Send response trailers to the client.
|
||||
|
||||
[source,erlang]
|
||||
----
|
||||
{trailers, cowboy:http_headers()}
|
||||
----
|
||||
|
||||
[[push_command]]
|
||||
=== push
|
||||
|
||||
|
@ -286,6 +296,13 @@ Same as the xref:data_command[data command].
|
|||
|
||||
Sent when the request process streams data to the client.
|
||||
|
||||
=== trailers
|
||||
|
||||
Same as the xref:trailers_command[trailers command].
|
||||
|
||||
Sent when the request process sends the trailer field values
|
||||
to the client.
|
||||
|
||||
=== push
|
||||
|
||||
Same as the xref:push_command[push command].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue