aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_req.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r--src/cowboy_req.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 253564d..da3a0a4 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -81,6 +81,7 @@
%% @todo stream_body/2 (nofin)
-export([stream_body/3]).
%% @todo stream_event/2,3
+-export([stream_trailers/2]).
-export([push/3]).
-export([push/4]).
@@ -774,6 +775,11 @@ stream_body(Data, IsFin, #{pid := Pid, streamid := StreamID, has_sent_resp := he
Pid ! {{Pid, StreamID}, {data, IsFin, Data}},
ok.
+-spec stream_trailers(cowboy:http_headers(), req()) -> ok.
+stream_trailers(Trailers, #{pid := Pid, streamid := StreamID, has_sent_resp := headers}) ->
+ Pid ! {{Pid, StreamID}, {trailers, Trailers}},
+ ok.
+
-spec push(binary(), cowboy:http_headers(), req()) -> ok.
push(Path, Headers, Req) ->
push(Path, Headers, Req, #{}).