Embedded Wireless Framework
|
HTTP functions. More...
Data Structures | |
struct | _ewf_adapter_api_http |
Typedefs | |
typedef struct _ewf_adapter_api_http | ewf_adapter_api_http |
typedef int | ewf_http_socket |
Functions | |
ewf_result | ewf_adapter_http_open (ewf_adapter *adapter_ptr, ewf_http_socket *http_socket_ptr) |
Open an HTTP socket. More... | |
ewf_result | ewf_adapter_http_close (ewf_adapter *adapter_ptr, ewf_http_socket http_socket) |
Close an HTTP socket. More... | |
ewf_result | ewf_adapter_http_context_configure (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, uint8_t context_id, uint8_t sprofile_id, const char *server_addr, uint16_t server_port, bool auth_type, const char *username_str, const char *password_str, bool ssl_enabled, uint32_t timeout) |
HTTP client configuration. More... | |
ewf_result | ewf_adapter_http_get (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, const char *uri, char **response_ptr_ptr, uint32 *response_length_ptr) |
HTTP GET request. More... | |
ewf_result | ewf_adapter_http_head (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, const char *uri_str, char **response_ptr_ptr, uint32 *response_length_ptr) |
HTTP HEAD request. More... | |
ewf_result | ewf_adapter_http_delete (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, const char *uri_str, char **response_ptr_ptr, uint32 *response_length_ptr) |
HTTP DELETE request. More... | |
ewf_result | ewf_adapter_http_post (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, const char *uri_str, const char *data, uint8_t content_type, char **response_ptr_ptr, uint32 *response_length_ptr) |
HTTP POST request. More... | |
ewf_result | ewf_adapter_http_put (ewf_adapter *adapter_ptr, ewf_http_socket http_socket, const char *uri_str const char *data_str, uint8_t content_type, char **response_ptr_ptr, uint32 *response_length_ptr) |
HTTP PUT request. More... | |
HTTP functions.
ewf_result ewf_adapter_http_close | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket | ||
) |
Close an HTTP socket.
[in] | http_socket | Socket number used as HTTP Profile ID |
ewf_result ewf_adapter_http_context_configure | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
uint8_t | context_id, | ||
uint8_t | sprofile_id, | ||
const char * | server_addr, | ||
uint16_t | server_port, | ||
bool | auth_type, | ||
const char * | username_str, | ||
const char * | password_str, | ||
bool | ssl_enabled, | ||
uint32_t | timeout | ||
) |
HTTP client configuration.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | context_id | PDP context ID |
[in] | sprofile_id | Secure profile ID |
[in] | server_addr | String containing server IP address or server name |
[in] | server_port | HTTP server port |
[in] | auth_type | Authentication method/type (No Authentication/ Basic Authentication) |
[in] | username_str | String indicating username for HTTP login |
[in] | password_str | String indicating passowrd for HTTP login |
[in] | ssl_enabled | HTTP secure option enable/disable |
[in] | timeout | Timeout in seconds |
ewf_result ewf_adapter_http_delete | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
const char * | uri_str, | ||
char ** | response_ptr_ptr, | ||
uint32 * | response_length_ptr | ||
) |
HTTP DELETE request.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | uri_str | HTTP resource (uri) |
[out] | response_ptr_ptr | Response for the HTTP request, if available |
[out] | response_length_ptr | Pointer to lenght of response |
ewf_result ewf_adapter_http_get | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
const char * | uri, | ||
char ** | response_ptr_ptr, | ||
uint32 * | response_length_ptr | ||
) |
HTTP GET request.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | uri | HTTP resource (uri) |
[out] | response_ptr | Response for the HTTP request, if available |
[out] | response_length_ptr | Pointer to lenght of response |
ewf_result ewf_adapter_http_head | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
const char * | uri_str, | ||
char ** | response_ptr_ptr, | ||
uint32 * | response_length_ptr | ||
) |
HTTP HEAD request.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | uri_str | HTTP resource (uri) |
[out] | response_ptr_ptr | Response for the HTTP request, if available |
[out] | response_length_ptr | Pointer to lenght of response |
ewf_result ewf_adapter_http_open | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket * | http_socket_ptr | ||
) |
Open an HTTP socket.
[in] | adapter_ptr | A pointer to the adapter structure |
[in,out] | http_socket_ptr | A pointer to an HTTP socket that will receive will initialized on open |
ewf_result ewf_adapter_http_post | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
const char * | uri_str, | ||
const char * | data, | ||
uint8_t | content_type, | ||
char ** | response_ptr_ptr, | ||
uint32 * | response_length_ptr | ||
) |
HTTP POST request.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | uri_str | HTTP resource (uri) |
[in] | data | Data to be sent |
[in] | content_type | HTTP Content-Type identifier. Refer the modem user manual for supported types |
[out] | response_ptr_ptr | Response for the HTTP request, if available |
[out] | response_length_ptr | Pointer to lenght of response |
ewf_result ewf_adapter_http_put | ( | ewf_adapter * | adapter_ptr, |
ewf_http_socket | http_socket, | ||
const char *uri_str const char * | data_str, | ||
uint8_t | content_type, | ||
char ** | response_ptr_ptr, | ||
uint32 * | response_length_ptr | ||
) |
HTTP PUT request.
[in] | adapter_ptr | A pointer to the adapter structure |
[in] | http_socket | The HTTP socket |
[in] | uri_str | HTTP resource (uri) |
[in] | data_str | Data to be sent |
[in] | content_type | HTTP Content-Type identifier. Refer the modem user manual for supported types |
[out] | response_ptr_ptr | Response for the HTTP request, if available |
[out] | response_length_ptr | Pointer to lenght of response |