diff options
author | Loïc Hoguin <[email protected]> | 2012-10-04 22:59:33 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-10-04 22:59:33 +0200 |
commit | 76cd1e40c933e60ed507474cceea4e25e10db225 (patch) | |
tree | 1accc06834f01152daef70ed6397ed7e38af5e08 /src/cowboy_protocol.erl | |
parent | 7367f07ca00c4fa4dd14792cc95251ef9c9207b1 (diff) | |
download | cowboy-76cd1e40c933e60ed507474cceea4e25e10db225.tar.gz cowboy-76cd1e40c933e60ed507474cceea4e25e10db225.tar.bz2 cowboy-76cd1e40c933e60ed507474cceea4e25e10db225.zip |
The onresponse hook now receives 4 arguments, including the body
We do not always provide the body however. It is not available
when using chunked replies, or when using set_resp_body_fun.
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r-- | src/cowboy_protocol.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index bf81e52..c5ea561 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -34,7 +34,7 @@ %% any dispatching is done. Host info, path info and bindings are thus %% not available at this point.</dd> %% <dt>onresponse</dt><dd>Optional fun that allows replacing a response -%% sent by the application based on its status code or headers.</dd> +%% sent by the application.</dd> %% <dt>timeout</dt><dd>Time in milliseconds before an idle %% connection is closed. Defaults to 5000 milliseconds.</dd> %% </dl> @@ -56,7 +56,7 @@ -type onrequest_fun() :: fun((Req) -> Req). -type onresponse_fun() :: - fun((cowboy_http:status(), cowboy_http:headers(), Req) -> Req). + fun((cowboy_http:status(), cowboy_http:headers(), iodata(), Req) -> Req). -export_type([onrequest_fun/0]). -export_type([onresponse_fun/0]). |