From 64a40cb479e45226c3498133c4e198a6dc35a3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 28 Nov 2011 09:09:41 +0100 Subject: 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. --- include/http.hrl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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() }). -- cgit v1.2.3