Compile-Time Configuration
µC/HTTP-client compile-time configuration allows for enabling/disabling of available features. This gives it a variable memory footprint (RAM & ROM).
A template configuration file (http-c_cfg.h
) is included in the module package (see Directories and Files). This configuration should be copied into the application directory and included in the project. Here is the list of each configuration variables description and value. However, keep in mind that future releases of this module might include more configuration options.
Argument Checking Configuration
All API functions in μC/HTTP-client include code to validate arguments that are passed to it. Specifically, μC/HTTP-client checks to see if passed pointers are NULL, if arguments are within valid ranges, etc. The following constant configures additional argument checking.
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_ARG_CHK_EXT_EN | Includes generated code to check arguments for functions that can be called by the user as well as internal functions which receive arguments from an API that the user can call. | DEF_ENABLED or DEF_DISABLED |
Task Configuration
µC/HTTP-client has an internal task that can be enabled or disabled. Using this internal task allows for simultaneous connection processing and using the API in a non-blocking mode.
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_MODE_ASYNC_TASK_EN | Enables/Disables the internal asynchronous task. When When | DEF_ENABLED or DEF_DISABLED |
HTTPc_CFG_MODE_BLOCK_EN | Enables/Disables the blocking option when the internal task is active. When the internal task is enabled, API functions can also be blocking but only if this configuration is enabled. | DEF_ENABLED or DEF_DISABLED |
Persistent Connection Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_PERSISTENT_EN | Enables/Disables the Persistent Connection Feature. | DEF_ENABLED or DEF_DISABLED |
Chunked Transfer Encoding Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_CHUNK_TX_EN | Enables/Disables the Chunked Tranfer Encoding feature for transmission | DEF_ENABLED or DEF_DISABLED |
Query String Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_QUERY_STR_EN | Enables/Disables the Query String Feature. | DEF_ENABLED or DEF_DISABLED |
Header Field Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_HDR_RX_EN | Enables/Disables the addition of header fields to HTTP Requests when transmitting. | DEF_ENABLED or DEF_DISABLED |
HTTPc_CFG_HDR_TX_EN | Enables/Disables the copy and processing of header fields for HTTP Responses received. | DEF_ENABLED or DEF_DISABLED |
Form Submission Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_FORM_EN | Enables/Disables the HTTP Form Submission Feature. | DEF_ENABLED or DEF_DISABLED |
User Data Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_USER_DATA_EN | Enables/Disables the addition of a void pointer in the The additional void pointer can be used by the upper application to store an application data pointer relative to the object. | DEF_ENABLED or DEF_DISABLED |
WebSocket Configuration
Constant | Description | Possible Values |
---|---|---|
HTTPc_CFG_WEBSOCKET_EN | Enables/Disables the WebSocket Feature. | DEF_ENABLED or DEF_DISABLED |
Note that the WebSocket feature requires that HTTPc_CFG_MODE_ASYNC_TASK_EN is enabled.