diff options
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r-- | src/cowboy_req.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index 7bc8ad6..741a8f1 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -103,6 +103,7 @@ %% Misc API. -export([compact/1]). +-export([lock/1]). -export([to_list/1]). -export([transport/1]). @@ -908,6 +909,12 @@ compact(Req) -> bindings=undefined, headers=[], p_headers=[], cookies=[]}. +%% @doc Prevent any further responses. +%% @private +-spec lock(Req) -> Req when Req::req(). +lock(Req) -> + Req#http_req{resp_state=locked}. + %% @doc Convert the Req object to a list of key/values. -spec to_list(req()) -> [{atom(), any()}]. to_list(Req) -> |