aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_stream.asciidoc
diff options
context:
space:
mode:
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].