aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-11-28 09:09:41 +0100
committerLoïc Hoguin <[email protected]>2011-11-28 09:09:41 +0100
commit64a40cb479e45226c3498133c4e198a6dc35a3f8 (patch)
tree3ba02fee0ef65d9e398c5b16de964a3722a89702 /include
parentdcc3d83e31a51dc209d776191bd6cc30bfa9a70c (diff)
downloadcowboy-64a40cb479e45226c3498133c4e198a6dc35a3f8.tar.gz
cowboy-64a40cb479e45226c3498133c4e198a6dc35a3f8.tar.bz2
cowboy-64a40cb479e45226c3498133c4e198a6dc35a3f8.zip
Add set_resp_header/3 and set_resp_body/2 to cowboy_http_req
These functions allow to set response headers and body in advance, before calling any of the reply functions. Also add has_resp_header/2 and has_resp_body/1 to check if the given response headers have already been set.
Diffstat (limited to 'include')
-rw-r--r--include/http.hrl4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/http.hrl b/include/http.hrl
index 7691966..d4fba18 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -66,5 +66,7 @@
buffer = <<>> :: binary(),
%% Response.
- resp_state = waiting :: locked | waiting | chunks | done
+ resp_state = waiting :: locked | waiting | chunks | done,
+ resp_headers = [] :: http_headers(),
+ resp_body = <<>> :: binary()
}).