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.

ConstantDescriptionPossible Values
HTTPc_CFG_ARG_CHK_EXT_ENIncludes 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.

ConstantDescriptionPossible Values
HTTPc_CFG_MODE_ASYNC_TASK_EN

Enables/Disables the internal asynchronous task.

When ENABLED, the internal task can accept simultaneous connections and can queue requests. API functions can be called with the non-blocking flag.

When DISABLED, the API functions will always be blocking.

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 

ConstantDescriptionPossible Values
HTTPc_CFG_PERSISTENT_ENEnables/Disables the Persistent Connection Feature.DEF_ENABLED or DEF_DISABLED

Chunked Transfer Encoding Configuration 

ConstantDescriptionPossible Values
HTTPc_CFG_CHUNK_TX_ENEnables/Disables the Chunked Tranfer Encoding feature for transmissionDEF_ENABLED or DEF_DISABLED

Query String Configuration 

ConstantDescriptionPossible Values
HTTPc_CFG_QUERY_STR_ENEnables/Disables the Query String Feature.DEF_ENABLED or DEF_DISABLED

Header Field Configuration 

ConstantDescriptionPossible Values
HTTPc_CFG_HDR_RX_ENEnables/Disables the addition of header fields to HTTP Requests when transmitting.DEF_ENABLED or DEF_DISABLED
HTTPc_CFG_HDR_TX_ENEnables/Disables the copy and processing of header fields for HTTP Responses received.DEF_ENABLED or DEF_DISABLED

Form Submission Configuration 

ConstantDescriptionPossible Values
HTTPc_CFG_FORM_ENEnables/Disables the HTTP Form Submission Feature.DEF_ENABLED or DEF_DISABLED

User Data Configuration 

ConstantDescriptionPossible Values
HTTPc_CFG_USER_DATA_EN

Enables/Disables the addition of a void pointer in the HTTPc_CONN_OBJ and HTTPc_REQ_OBJ objects.

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 

ConstantDescriptionPossible 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.