4.8.0.0R6
Software Development Kit
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
ltrx_http_client.h File Reference

Definitions related to HTTP client. More...

Data Structures

struct  ltrx_http_client_connect_info
 HTTP client connect information. More...
 
struct  ltrx_http_client_header
 HTTP client header. More...
 

Enumerations

enum  ltrx_httpc_method { LTRX_HTTPC_METHOD__UNSPECIFIED, LTRX_HTTPC_METHOD__POST, LTRX_HTTPC_METHOD__GET }
 HTTP client methods. More...
 
enum  ltrx_httpc_return_code {
  LTRX_HTTPC_RC__SUCCESS = 0, LTRX_HTTPC_RC__INVALID_PARAMETER = -1, LTRX_HTTPC_RC__NOT_ENOUGH_MEMORY = -2, LTRX_HTTPC_RC__INVALID_STATE = -3,
  LTRX_HTTPC_RC__CONNECT_FAILED = -4, LTRX_HTTPC_RC__PROTOCOL_ERROR = -5, LTRX_HTTPC_RC__HTTP_ERROR_RESPONSE = -6, LTRX_HTTPC_RC__OTHER_FAILURE = -7
}
 HTTP client Return codes. More...
 

Functions

enum ltrx_httpc_return_code ltrx_httpc_request_add_header (struct ltrx_http_client_request *handle, struct ltrx_http_client_header *httpHeader)
 Add an HTTP client request header. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_add_mime_type (struct ltrx_http_client_request *handle, const char *mimeType)
 Add an HTTP client request mime type. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_add_tls_authority (struct ltrx_http_client_request *handle, const char *authorityPemCertificate)
 Add an HTTP client request TLS authority certificate. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_clear (struct ltrx_http_client_request *handle)
 Clear an HTTP client request. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_connect_and_send_headers (struct ltrx_http_client_request *handle)
 HTTP client request execute connect and send headers. More...
 
struct ltrx_http_client_request * ltrx_httpc_request_create (enum ltrx_httpc_method method)
 Create an HTTP client handle. More...
 
void ltrx_httpc_request_destroy (struct ltrx_http_client_request *handle)
 Destroy an HTTP client request. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_disconnect (struct ltrx_http_client_request *handle)
 HTTP client request execute disconnect. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_execute (struct ltrx_http_client_request *handle)
 HTTP client request execute connect, send, receive, and disconnect. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_get_log_verbosity (struct ltrx_http_client_request *handle, uint8_t *verbosityLevel)
 Get the HTTP client request log verbosity. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_get_status_code (struct ltrx_http_client_request *handle, uint32_t *optStatusNumber, char *optStatusStringBuf, size_t *optStatusStringBufLengthp)
 Get then HTTP client request status code and/or string. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_receive (struct ltrx_http_client_request *handle)
 HTTP client request execute receive. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_send_content (struct ltrx_http_client_request *handle)
 HTTP client request execute send content. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_100continue_timeout (struct ltrx_http_client_request *handle, uint32_t timeoutMsec)
 Set an HTTP client request 100 continue timeout. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_connect_info (struct ltrx_http_client_request *handle, const struct ltrx_http_client_connect_info *info)
 Set the HTTP client request connect information. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_debug (struct ltrx_http_client_request *handle, bool dumpSend, bool dumpReceive)
 Set the HTTP client request debug flags. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_log_verbosity (struct ltrx_http_client_request *handle, uint8_t verbosityLevel)
 Set the HTTP client request log verbosity. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_method (struct ltrx_http_client_request *handle, enum ltrx_httpc_method method)
 Set the HTTP client request method. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_response_buffer_malloc (struct ltrx_http_client_request *handle, uint8_t **bufferp, size_t optResponseSizeEstimate)
 Initialize an HTTP client request input method of allocated buffer. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_response_callback (struct ltrx_http_client_request *handle, bool(*readCallback)(struct ltrx_http_client_request *handle, void *opaque, const void *data, size_t size), void *readCallbackOpaque)
 Initialize an HTTP client request input method of callback function. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_response_inactivity_timeout (struct ltrx_http_client_request *handle, uint32_t timeoutMsec)
 Set an HTTP client request timeout. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_response_stream (struct ltrx_http_client_request *handle, struct output_stream *outStream)
 Initialize an HTTP client request input method of output stream. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_tls_credential (struct ltrx_http_client_request *handle, const char *credentialName)
 Set the HTTP client request TLS credential name. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_user_agent (struct ltrx_http_client_request *handle, const char *userAgent)
 Set the HTTP client request user agent. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_write_buffer (struct ltrx_http_client_request *handle, const void *buffer, size_t bufferSize)
 Initialize an HTTP client request output method of buffer. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_write_function (struct ltrx_http_client_request *handle, void(*writeCallback)(const uint8_t **datap, size_t *sizep, void *opaque), void *writeCallbackOpaque)
 Initialize an HTTP client request output method of callback function. More...
 
enum ltrx_httpc_return_code ltrx_httpc_request_set_write_stream (struct ltrx_http_client_request *handle, struct input_stream *inStream)
 Initialize an HTTP client request output method of input stream. More...
 
const char * ltrx_httpc_strerror (enum ltrx_httpc_return_code)
 Convert error code to text. More...
 
bool ltrx_input_stream_init_from_httpc_request (struct input_stream_from_httpc_request *inStream, struct ltrx_http_client_request *handle)
 Initialize an HTTP client request input stream struct. More...
 
bool ltrx_output_stream_init_to_httpc_request (struct output_stream_to_httpc_request *outStream, struct ltrx_http_client_request *handle)
 Initialize an HTTP client request output stream struct. More...
 

Detailed Description

Definitions related to HTTP client.