diff options
author | David M. Lee <dlee@digium.com> | 2013-05-23 21:46:38 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-05-23 21:46:38 +0000 |
commit | 32a86f902a2440fabc76e8da0ff2c7f80b3bb723 (patch) | |
tree | b7fdb740043e5b2f41ed5f5e7e4ad3b7862afdfc /res/res_stasis_http.c | |
parent | 9c7c1897e55b479dfbed8cdc40acaadee32609fe (diff) |
stasis-http: Provide a response body for 201 created responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis_http.c')
-rw-r--r-- | res/res_stasis_http.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_stasis_http.c b/res/res_stasis_http.c index 63e2601e8..a4ea30567 100644 --- a/res/res_stasis_http.c +++ b/res/res_stasis_http.c @@ -311,7 +311,7 @@ void stasis_http_response_error(struct stasis_http_response *response, void stasis_http_response_ok(struct stasis_http_response *response, struct ast_json *message) { - response->message = message; + response->message = ast_json_ref(message); response->response_code = 200; response->response_text = "OK"; } @@ -331,9 +331,9 @@ void stasis_http_response_alloc_failed(struct stasis_http_response *response) } void stasis_http_response_created(struct stasis_http_response *response, - const char *url) + const char *url, struct ast_json *message) { - response->message = ast_json_null(); + response->message = ast_json_ref(message); response->response_code = 201; response->response_text = "Created"; ast_str_append(&response->headers, 0, "Location: %s\r\n", url); |