| 98 Event writeev; |
98 Event writeev; |
| 99 }; |
99 }; |
| 100 |
100 |
| 101 HttpClient* http_client_new(EventHandler *ev); |
101 HttpClient* http_client_new(EventHandler *ev); |
| 102 |
102 |
| |
103 void http_client_free(HttpClient *client); |
| |
104 |
| 103 int http_client_set_addr(HttpClient *client, const struct sockaddr *addr, socklen_t addrlen); |
105 int http_client_set_addr(HttpClient *client, const struct sockaddr *addr, socklen_t addrlen); |
| |
106 |
| |
107 int http_client_set_method(HttpClient *client, const char *method); |
| |
108 |
| |
109 int http_client_set_uri(HttpClient *client, const char *uri); |
| |
110 |
| |
111 int http_client_set_method_len(HttpClient *client, const char *method, size_t len); |
| |
112 |
| |
113 int http_client_set_uri_len(HttpClient *client, const char *uri, size_t len); |
| 104 |
114 |
| 105 /* |
115 /* |
| 106 * Adds a request header |
116 * Adds a request header |
| 107 * |
117 * |
| 108 * This function does not create a copy of name/value. The string pointers must |
118 * This function does not create a copy of name/value. The string pointers must |