From 4c22bdbcb75ecc8176e0f42899ed8c03729cc628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 11 Dec 2017 11:00:47 +0100 Subject: Document 2.2 changes and the new stream_trailers function --- doc/src/manual/cowboy_stream.asciidoc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'doc/src/manual/cowboy_stream.asciidoc') 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]. -- cgit v1.2.3