aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_stream.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-12-11 11:00:47 +0100
committerLoïc Hoguin <[email protected]>2017-12-11 11:00:47 +0100
commit4c22bdbcb75ecc8176e0f42899ed8c03729cc628 (patch)
tree554f97be48ae97e25af5d59d440acef581ae27c9 /doc/src/manual/cowboy_stream.asciidoc
parent17719a136dbe520436ae4aa5dd4827a19b1a5348 (diff)
downloadcowboy-4c22bdbcb75ecc8176e0f42899ed8c03729cc628.tar.gz
cowboy-4c22bdbcb75ecc8176e0f42899ed8c03729cc628.tar.bz2
cowboy-4c22bdbcb75ecc8176e0f42899ed8c03729cc628.zip
Document 2.2 changes and the new stream_trailers function
Diffstat (limited to 'doc/src/manual/cowboy_stream.asciidoc')
-rw-r--r--doc/src/manual/cowboy_stream.asciidoc21
1 files changed, 19 insertions, 2 deletions
diff --git a/doc/src/manual/cowboy_stream.asciidoc b/doc/src/manual/cowboy_stream.asciidoc
index a26d420..103b97e 100644
--- a/doc/src/manual/cowboy_stream.asciidoc
+++ b/doc/src/manual/cowboy_stream.asciidoc
@@ -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].