void http_response_destroy(struct http_response *resp)
Free any data associated to the http_response.
Definition: http.c:154
size_t header_length
The length of the header in Bytes.
Definition: http.h:30
char * location
The location in case of a non-resolved redirect.
Definition: http.h:33
struct http_response * http_request_get_only_header(struct network_conn *nwc, char *url, char *host, size_t follow_redirect_steps)
Send an HTTP request to host using nwc and reads the header.
Definition: http.c:47
int http_status
The HTTP-Status, 200 in case of success.
Definition: http.h:32
char * buffer
A pointer to the raw buffer (most likely not usefull, primarily for http_response_destroy() ...
Definition: http.h:28
struct network_conn * nwc
A new network-connection (used if the server redirects)
Definition: http.h:27
struct http_response * http_request_get(struct network_conn *nwc, char *url, char *host)
Send an HTTP request and read the header along with the body.
Definition: http.c:114
size_t content_length
The length of the body (the actual data)
Definition: http.h:31
char * body
A pointer to the body (the actual data returned by the server)
Definition: http.h:29