mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
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:
parent
61b93af561
commit
4f4d0c9318
6
http.c
6
http.c
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user