Lines Matching full:http

44 /** @file event2/http.h
46 * Basic support for HTTP serving.
50 * need to write HTTP code. The following prototypes and definitions provide
51 * an application with a minimal interface for making HTTP requests and for
52 * creating a very simple HTTP server.
61 #define HTTP_BADREQUEST 400 /**< invalid http request was made */
78 * Create a new HTTP server.
80 * @param base (optional) the event base to receive the HTTP events
89 * Binds an HTTP server on the specified address and port.
91 * Can be called multiple times to bind the same http server
94 * @param http a pointer to an evhttp object
101 int evhttp_bind_socket(struct evhttp *http, const char *address, ev_uint16_t port);
106 * The returned pointer is not valid after \a http is freed.
108 * @param http a pointer to an evhttp object
115 struct evhttp_bound_socket *evhttp_bind_socket_with_handle(struct evhttp *http, const char *address…
118 * Makes an HTTP server accept connections on the specified socket.
121 * of an http server, or when a socket has been communicated via file
122 * descriptor passing in situations where an http servers does not have
125 * Can be called multiple times to have the http server listen to
128 * @param http a pointer to an evhttp object
134 int evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd);
139 * The returned pointer is not valid after \a http is freed.
141 * @param http a pointer to an evhttp object
147 struct evhttp_bound_socket *evhttp_accept_socket_with_handle(struct evhttp *http, evutil_socket_t f…
155 struct evhttp_bound_socket *evhttp_bind_listener(struct evhttp *http, struct evconnlistener *listen…
166 * evhttp_bound_sockets associated with "http". The user must not
170 * @param http pointer to an evhttp object
175 void evhttp_foreach_bound_socket(struct evhttp *http, evhttp_bound_socket_foreach_fn *function, voi…
178 * Makes an HTTP server stop accepting connections on the specified socket
190 * @param http a pointer to an evhttp object
195 void evhttp_del_accept_socket(struct evhttp *http, struct evhttp_bound_socket *bound_socket);
208 * Free the previously created HTTP server.
212 * @param http the evhttp server object to be freed
216 void evhttp_free(struct evhttp* http);
220 void evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size);
223 void evhttp_set_max_body_size(struct evhttp* http, ev_ssize_t max_body_size);
230 @param http the http server on which to set the default content type
234 void evhttp_set_default_content_type(struct evhttp *http,
238 Sets the what HTTP methods are supported in requests accepted by this
245 @param http the http server on which to set the methods
249 void evhttp_set_allowed_methods(struct evhttp* http, ev_uint16_t methods);
254 @param http the http sever on which to set the callback
261 int evhttp_set_cb(struct evhttp *http, const char *path,
275 @param http the evhttp server object for which to set the callback
280 void evhttp_set_gencb(struct evhttp *http,
293 @param http the evhttp server object for which to set the callback
298 void evhttp_set_bevcb(struct evhttp *http,
302 Adds a virtual host to the http server.
309 is called on the main http server, it will be automatically freed, too.
315 @param http the evhttp object to which to add a virtual host
319 @param vhost the virtual host to add the regular http server.
324 int evhttp_add_virtual_host(struct evhttp* http, const char *pattern,
328 Removes a virtual host from the http server.
330 @param http the evhttp object from which to remove the virtual host
331 @param vhost the virtual host to remove from the regular http server.
336 int evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost);
339 Add a server alias to an http object. The http object can be a virtual
342 @param http the evhttp object
347 int evhttp_add_server_alias(struct evhttp *http, const char *alias);
350 Remove a server alias from an http object.
352 @param http the evhttp object
357 int evhttp_remove_server_alias(struct evhttp *http, const char *alias);
360 * Set the timeout for an HTTP request.
362 * @param http an evhttp object
366 void evhttp_set_timeout(struct evhttp *http, int timeout_in_secs);
369 * Set the timeout for an HTTP request.
371 * @param http an evhttp object
375 void evhttp_set_timeout_tv(struct evhttp *http, const struct timeval* tv);
381 * Set connection flags for HTTP server.
388 int evhttp_set_flags(struct evhttp *http, int flags);
396 * @param error the HTTP error code
413 * @param code the HTTP response code to send
434 @param code the HTTP response code to send
508 * Create and return a connection object that can be used to for making HTTP
510 * connection when it is given an http request object.
534 * Return the HTTP server associated with this connection, or NULL.
632 * Create and return a connection object that can be used to for making HTTP
634 * connection when it is given an http request object.
660 * can send get EPIPE and fail, while we can read that HTTP error. */
664 /* Padding for public flags, @see EVHTTP_CON_* in http-internal.h */
712 /** Frees an http connection */
724 /** sets the ip address from which http connections are made */
729 /** sets the local port from which http connections are made */
779 Make an HTTP request over the specified connection.
797 Cancels a pending HTTP request.
799 Cancels an ongoing HTTP request. The callback associated with this request
851 /* Interfaces for dealing with HTTP headers */
949 Helper function to decode a URI-escaped string or HTTP parameter.
951 If 'decode_plus' is 1, then we decode the string as an HTTP parameter
972 http://foo.com/?q=test&s=some+thing
991 HTTP URI.
1129 * mailto url, http://www.example.com:99999/ is not a reasonable HTTP
1146 * Unfortunately, some HTTP clients generate URIs that, according to RFC3986,