]> granicus.if.org Git - libevent/commitdiff
Add evhttp_response_code to remove one more reason to include http_struct.h
authorNick Mathewson <nickm@torproject.org>
Wed, 3 Nov 2010 19:12:08 +0000 (15:12 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 3 Nov 2010 19:12:08 +0000 (15:12 -0400)
http.c
include/event2/http.h

diff --git a/http.c b/http.c
index 2a1cb6707a9e82513f81e953e3665761440b75f4..aafb509d985ad7e247fd7faf981d124f7eed341f 100644 (file)
--- a/http.c
+++ b/http.c
@@ -3171,6 +3171,12 @@ evhttp_request_get_command(const struct evhttp_request *req) {
        return (req->type);
 }
 
+int
+evhttp_request_get_response_code(const struct evhttp_request *req)
+{
+       return req->response_code;
+}
+
 /** Returns the input headers */
 struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req)
 {
index d8a716ae91a9d21992e4282667ff8f1f63b0bff7..e0fdefe0e1f51aa2d2d8b5553d669460fb741232 100644 (file)
@@ -466,11 +466,13 @@ int evhttp_make_request(struct evhttp_connection *evcon,
 */
 void evhttp_cancel_request(struct evhttp_request *req);
 
-
 /** Returns the request URI */
 const char *evhttp_request_get_uri(const struct evhttp_request *req);
 /** Returns the request command */
 enum evhttp_cmd_type evhttp_request_get_command(const struct evhttp_request *req);
+
+int evhttp_request_get_response_code(const struct evhttp_request *req);
+
 /** Returns the input headers */
 struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req);
 /** Returns the output headers */