diff options
author | Magnus Klaar <[email protected]> | 2011-12-28 18:00:27 +0100 |
---|---|---|
committer | Magnus Klaar <[email protected]> | 2011-12-28 18:17:10 +0100 |
commit | 937a2b03260a86b915a128fbbdf3b88a8a76cc3f (patch) | |
tree | 9ded51718819674c8fc67fe1ee8d938f85eb223e /include | |
parent | 612b8f21feed57bea51958487442be1a7c8ae9b1 (diff) | |
download | cowboy-937a2b03260a86b915a128fbbdf3b88a8a76cc3f.tar.gz cowboy-937a2b03260a86b915a128fbbdf3b88a8a76cc3f.tar.bz2 cowboy-937a2b03260a86b915a128fbbdf3b88a8a76cc3f.zip |
Add cowboy_http_req:set_resp_body_fun/3.
Diffstat (limited to 'include')
-rw-r--r-- | include/http.hrl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/http.hrl b/include/http.hrl index 84b9489..c47a244 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -36,6 +36,8 @@ -type http_headers() :: list({http_header(), iodata()}). -type http_cookies() :: list({binary(), binary()}). -type http_status() :: non_neg_integer() | binary(). +-type http_resp_body() :: iodata() | {non_neg_integer(), + fun(() -> {sent, non_neg_integer()})}. -record(http_req, { %% Transport. @@ -69,7 +71,7 @@ %% Response. resp_state = waiting :: locked | waiting | chunks | done, resp_headers = [] :: http_headers(), - resp_body = <<>> :: iodata(), + resp_body = <<>> :: http_resp_body(), %% Functions. urldecode :: {fun((binary(), T) -> binary()), T} |