RTS API Documentation
1.10.11
|
#include <xswitch.h>
Go to the source code of this file.
Macros | |
#define | BUFFER_LEN 1024 |
Functions | |
static size_t | file_callback (void *ptr, size_t size, size_t nmemb, void *data) |
static size_t | header_callback (void *ptr, size_t size, size_t nmemb, void *data) |
http_data_t * | xswitch_http_post (const char *url, const char *data, switch_memory_pool_t *pool) |
http_data_t * | xswitch_http_get (const char *url, switch_memory_pool_t *pool) |
http_data_t * | xswitch_http_request (int method, const char *url, const void *data, size_t datalen, switch_curl_slist_t *headers, switch_memory_pool_t *pool, int curl_connect_timeout, int curl_timeout) |
#define BUFFER_LEN 1024 |
Definition at line 35 of file xswitch.c.
Referenced by file_callback().
|
static |
Definition at line 37 of file xswitch.c.
References http_data_s::body_buffer, BUFFER_LEN, switch_buffer_create_dynamic(), and switch_buffer_write().
Referenced by xswitch_http_request().
|
static |
Definition at line 51 of file xswitch.c.
References http_data_s::headers, http_data_s::pool, switch_copy_string(), switch_core_alloc, and switch_curl_slist_append().
Referenced by xswitch_http_request().
http_data_t* xswitch_http_get | ( | const char * | url, |
switch_memory_pool_t * | pool | ||
) |
Definition at line 71 of file xswitch.c.
References SWITCH_DECLARE, XSWITCH_CM_GET, and xswitch_http_request().
http_data_t* xswitch_http_post | ( | const char * | url, |
const char * | data, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 66 of file xswitch.c.
References XSWITCH_CM_POST, and xswitch_http_request().
http_data_t* xswitch_http_request | ( | int | method, |
const char * | url, | ||
const void * | data, | ||
size_t | datalen, | ||
switch_curl_slist_t * | headers, | ||
switch_memory_pool_t * | pool, | ||
int | curl_connect_timeout, | ||
int | curl_timeout | ||
) |
Definition at line 77 of file xswitch.c.
References http_data_s::body_buffer, http_data_s::body_size, http_data_s::code, http_data_s::content_type, file_callback(), header_callback(), http_data_s::perform_code, http_data_s::pool, pool, switch_buffer_inuse(), SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_strdup, switch_CURL, switch_curl_easy_cleanup(), switch_curl_easy_getinfo(), switch_curl_easy_init(), switch_curl_easy_perform(), switch_curl_easy_setopt(), switch_curl_slist_free_all(), SWITCH_LOG_DEBUG, switch_log_printf(), and XSWITCH_CM_GET.
Referenced by xswitch_http_get(), and xswitch_http_post().