Go to the source code of this file.
Classes | |
struct | httpc_conn |
Typedefs | |
typedef httpc_conn | httpc_conn_t |
Functions | |
herror_t | httpc_init (int argc, char **argv) |
void | httpc_destroy (void) |
httpc_conn_t * | httpc_new (void) |
void | httpc_free (httpc_conn_t *conn) |
void | httpc_close_free (httpc_conn_t *conn) |
int | httpc_set_header (httpc_conn_t *conn, const char *key, const char *value) |
int | httpc_add_header (httpc_conn_t *conn, const char *key, const char *value) |
void | httpc_add_headers (httpc_conn_t *conn, const hpair_t *values) |
int | httpc_set_basic_authorization (httpc_conn_t *conn, const char *user, const char *password) |
int | httpc_set_basic_proxy_authorization (httpc_conn_t *conn, const char *user, const char *password) |
herror_t | httpc_get (httpc_conn_t *conn, hresponse_t **out, const char *urlstr) |
herror_t | httpc_post_begin (httpc_conn_t *conn, const char *url) |
herror_t | httpc_post_end (httpc_conn_t *conn, hresponse_t **out) |
herror_t | httpc_mime_begin (httpc_conn_t *conn, const char *url, const char *related_start, const char *related_start_info, const char *related_type) |
herror_t | httpc_mime_next (httpc_conn_t *conn, const char *content_id, const char *content_type, const char *transfer_encoding) |
herror_t | httpc_mime_end (httpc_conn_t *conn, hresponse_t **out) |
herror_t | httpc_mime_send_file (httpc_conn_t *conn, const char *content_id, const char *content_type, const char *transfer_encoding, const char *filename) |
|
|
|
Adds a header element (key, value) pair.
Definition at line 182 of file nanohttp-client.c. References httpc_conn::header, hpairnode_new(), and log_warn1. Referenced by httpc_add_headers(). |
|
Adds a list of (key, value) pairs.
Definition at line 196 of file nanohttp-client.c. References httpc_add_header(), hpair::key, log_warn1, hpair::next, and hpair::value. |
|
Close and release a connection
Definition at line 170 of file nanohttp-client.c. References hsocket_close(), httpc_free(), and httpc_conn::sock. |
|
Destroys the nanoHTTP client module.
Definition at line 86 of file nanohttp-client.c. References hsocket_module_destroy(). Referenced by soap_nhttp_client_destroy(). |
|
Release a connection (use httpc_close_free() instead)
Definition at line 139 of file nanohttp-client.c. References httpc_conn::header, hpairnode_free(), hsocket_free(), http_output_stream_free(), hurl_free(), hpair::next, httpc_conn::out, httpc_conn::sock, and httpc_conn::url. Referenced by httpc_close_free(). |
|
Invoke a "GET" method request and receive the response
Definition at line 445 of file nanohttp-client.c. References H_OK, herror_message(), hresponse_new_from_socket(), HTTP_REQUEST_GET, log_error2, and httpc_conn::sock. |
|
Initializes the nanoHTTP client module.
Definition at line 80 of file nanohttp-client.c. References hsocket_module_init(). Referenced by soap_nhttp_client_init_args(). |
|
Begin MIME multipart/related POST request
Definition at line 513 of file nanohttp-client.c. References HEADER_CONTENT_TYPE, httpc_post_begin(), and httpc_set_header(). |
|
Finish MIME request and get the response
Definition at line 581 of file nanohttp-client.c. References H_OK, hresponse_new_from_socket(), http_output_stream_flush(), http_output_stream_write(), httpc_conn::out, and httpc_conn::sock. |
|
Send boundary and part header and continue with next part
Definition at line 556 of file nanohttp-client.c. References H_OK, HEADER_CONTENT_ID, HEADER_CONTENT_TRANSFER_ENCODING, HEADER_CONTENT_TYPE, http_output_stream_write(), and httpc_conn::out. Referenced by httpc_mime_send_file(). |
|
Send boundary and part header and continue with next part Definition at line 611 of file nanohttp-client.c. References FILE_ERROR_OPEN, FILE_ERROR_READ, H_OK, herror_new(), http_output_stream_write(), httpc_mime_next(), log_error2, log_verbose1, MAX_FILE_BUFFER_SIZE, and httpc_conn::out. |
|
Creates a new HTTP client connection object. You need to create at least one HTTP client connection to communicate via HTTP.
Definition at line 94 of file nanohttp-client.c. References H_OK, httpc_conn::header, herror_message(), hsocket_init(), HTTP_1_1, hurl_free(), httpc_conn::id, log_error2, log_warn2, httpc_conn::out, httpc_conn::sock, httpc_conn::url, and httpc_conn::version. |
|
Start a "POST" method request
Definition at line 465 of file nanohttp-client.c. References H_OK, httpc_conn::header, herror_message(), http_output_stream_new(), HTTP_REQUEST_POST, log_error2, httpc_conn::out, and httpc_conn::sock. Referenced by httpc_mime_begin(). |
|
End a "POST" method and receive the response. You MUST call httpc_post_end() before!
Definition at line 486 of file nanohttp-client.c. References H_OK, hresponse_new_from_socket(), http_output_stream_flush(), httpc_conn::out, and httpc_conn::sock. |
|
Sets a HEADER_AUTHORIZATION header.
Definition at line 268 of file nanohttp-client.c. References HEADER_AUTHORIZATION. |
|
Sets a HEADER_PROXY_AUTHORIZATION header.
Definition at line 274 of file nanohttp-client.c. References HEADER_PROXY_AUTHORIZATION. |
|
Sets header element (key,value) pair.
Definition at line 217 of file nanohttp-client.c. References httpc_conn::header, hpairnode_new(), hpair::key, log_warn1, hpair::next, and hpair::value. Referenced by httpc_mime_begin(). |