add evhttp_request_get_response_code_line

This is needed to be able to read the response code line especially
when acting as an http client using evhttp_make_request.

(patched by nickm to make the return value const)
This commit is contained in:
Jay R. Wren 2012-10-10 13:16:02 -04:00 committed by Nick Mathewson
parent 61b93af561
commit 4f4d0c9318
2 changed files with 7 additions and 0 deletions

6
http.c
View File

@ -3813,6 +3813,12 @@ evhttp_request_get_response_code(const struct evhttp_request *req)
return req->response_code;
}
const char *
evhttp_request_get_response_code_line(const struct evhttp_request *req)
{
return req->response_code_line;
}
/** Returns the input headers */
struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req)
{

View File

@ -602,6 +602,7 @@ const struct evhttp_uri *evhttp_request_get_evhttp_uri(const struct evhttp_reque
enum evhttp_cmd_type evhttp_request_get_command(const struct evhttp_request *req);
int evhttp_request_get_response_code(const struct evhttp_request *req);
const char * evhttp_request_get_response_code_line(const struct evhttp_request *req);
/** Returns the input headers */
struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req);