![]() |
C library for SOAP (Simple Object Access Protocol) |
Data Structures | |
| struct | httpc_conn |
Typedefs | |
| typedef struct 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) |
| typedef struct httpc_conn httpc_conn_t |
| int httpc_add_header | ( | httpc_conn_t * | conn, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
Adds a header element (key, value) pair.
http_general_header_fields
http_request_header_fields
| void httpc_add_headers | ( | httpc_conn_t * | conn, | |
| const hpair_t * | values | |||
| ) |
Adds a list of (key, value) pairs.
http_general_header_fields
http_request_header_fields
| void httpc_close_free | ( | httpc_conn_t * | conn | ) |
| void httpc_destroy | ( | void | ) |
| void httpc_free | ( | httpc_conn_t * | conn | ) |
| herror_t httpc_get | ( | httpc_conn_t * | conn, | |
| hresponse_t ** | out, | |||
| const char * | urlstr | |||
| ) |
Invoke a "GET" method request and receive the response
| herror_t httpc_init | ( | int | argc, | |
| char ** | argv | |||
| ) |
Initializes the nanoHTTP client module.
| argc | Argument count. | |
| argv | Argument vector. |
| 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_end | ( | httpc_conn_t * | conn, | |
| hresponse_t ** | out | |||
| ) |
Finish MIME request and get the response
| herror_t httpc_mime_next | ( | httpc_conn_t * | conn, | |
| const char * | content_id, | |||
| const char * | content_type, | |||
| const char * | transfer_encoding | |||
| ) |
Send boundary and part header and continue with next part
| 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 | |||
| ) |
Send boundary and part header and continue with next part
| httpc_conn_t* httpc_new | ( | void | ) |
Creates a new HTTP client connection object. You need to create at least one HTTP client connection to communicate via HTTP.
| herror_t httpc_post_begin | ( | httpc_conn_t * | conn, | |
| const char * | url | |||
| ) |
| herror_t httpc_post_end | ( | httpc_conn_t * | conn, | |
| hresponse_t ** | out | |||
| ) |
End a "POST" method and receive the response. You MUST call httpc_post_end() before!
| int httpc_set_basic_authorization | ( | httpc_conn_t * | conn, | |
| const char * | user, | |||
| const char * | password | |||
| ) |
Sets a HEADER_AUTHORIZATION header.
| conn | The HTTP connection. | |
| user | The username. | |
| password | The password. |
| int httpc_set_basic_proxy_authorization | ( | httpc_conn_t * | conn, | |
| const char * | user, | |||
| const char * | password | |||
| ) |
Sets a HEADER_PROXY_AUTHORIZATION header.
| conn | The HTTP connection. | |
| user | The username. | |
| password | The password. |
| int httpc_set_header | ( | httpc_conn_t * | conn, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
Sets header element (key,value) pair.
http_general_header_fields
http_request_header_fields