aboutsummaryrefslogtreecommitdiffstats
path: root/include/http.hrl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-23 09:46:40 +0100
committerLoïc Hoguin <[email protected]>2012-01-23 09:46:40 +0100
commit7b359352d4430e40a504c4b8e7a62a174b9ca6a0 (patch)
tree44a3a9b96b307df2495513b948898140a4fe8d6c /include/http.hrl
parent16d3cb76c7b7d82301ab6542f8c6e94a4ee358d5 (diff)
downloadcowboy-7b359352d4430e40a504c4b8e7a62a174b9ca6a0.tar.gz
cowboy-7b359352d4430e40a504c4b8e7a62a174b9ca6a0.tar.bz2
cowboy-7b359352d4430e40a504c4b8e7a62a174b9ca6a0.zip
Remove http_resp_body/0, inline it directly in the record definition
Diffstat (limited to 'include/http.hrl')
-rw-r--r--include/http.hrl8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/http.hrl b/include/http.hrl
index e97975e..c66f2b0 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -13,9 +13,6 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--type http_resp_body() :: iodata() | {non_neg_integer(),
- fun(() -> {sent, non_neg_integer()})}.
-
-record(http_req, {
%% Transport.
socket = undefined :: undefined | inet:socket(),
@@ -44,13 +41,14 @@
%% Request body.
body_state = waiting :: waiting | done |
- {multipart, non_neg_integer(), fun()},
+ {multipart, non_neg_integer(), fun()},
buffer = <<>> :: binary(),
%% Response.
resp_state = waiting :: locked | waiting | chunks | done,
resp_headers = [] :: cowboy_http:headers(),
- resp_body = <<>> :: http_resp_body(),
+ resp_body = <<>> :: iodata() | {non_neg_integer(),
+ fun(() -> {sent, non_neg_integer()})},
%% Functions.
urldecode :: {fun((binary(), T) -> binary()), T}