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 c807a75..d416916 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -104,6 +104,7 @@
-export([ensure_response/2]).
%% Private setter/getter API.
+-export([append_buffer/2]).
-export([get/2]).
-export([set/2]).
-export([set_bindings/4]).
@@ -1066,6 +1067,11 @@ ensure_response(#http_req{socket=Socket, transport=Transport,
%% Private setter/getter API.
%% @private
+-spec append_buffer(binary(), Req) -> Req when Req::req().
+append_buffer(Suffix, Req=#http_req{buffer=Buffer}) ->
+ Req#http_req{buffer= << Buffer/binary, Suffix/binary >>}.
+
+%% @private
-spec get(atom(), req()) -> any(); ([atom()], req()) -> any().
get(List, Req) when is_list(List) ->
[g(Atom, Req) || Atom <- List];