Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

µC/HTTP-client offers many structures that the application can use to create objects to interact with the µC/HTTP-client stack.

All the HTTP Client Objects required by the application must be allocated by the application and passed to the µC/HTTP-client stack.

All objects or strings passed to the µC/HTTP-client stack MUST stay valid and unmodified for the duration of the HTTP Transaction for Request-oriented parameters and objects; or until the HTTP connection is closed for Connection-oriented parameters and objects.

HTTP Client Connection (HTTPc_CONN_OBJ)

This structure is the main one used by µC/HTTP-client. It contains all parameters relative to an HTTP connection (server port number, server address, server host name, etc.) and also many internal parameters for the HTTP connection and HTTP transaction processing.

Each configurable parameter SHOULD be set up with the function HTTPc_ConnSetParam(). The list of available parameters for a connection can be viewed here.

The members of an HTTP Client object should never be directly tampered with at any time. To ensure this, the HTTPc_CONN_OBJ structure's members have all been declared constant with the const keyword and the suffix _reserved has been added.

HTTP Client Request (HTTPc_REQ_OBJ)

This structure regroups parameters and flags related to the configuration of an HTTP request.

Each configurable parameter SHOULD be set up with the function HTTPc_ReqSetParam(). The list of available parameters for a connection can be viewed here.

The members of an HTTP Request object should never be directly tempered with at any time. To ensure this, the HTTPc_REQ_OBJ structure's members have all been declared constant with the const keyword and the suffix _reserved has been added.

HTTP Client Response (HTTPc_RESP_OBJ)

This structure will be filled by the µC/HTTP-client core with the data received in the HTTP response; except for the body part that is retrieved by the application with the hook function Response Body Hook.

HTTP Client Key-Value Pair (HTTPc_KEY_VAL)

Key-Value Pair Objects can be used with the HTTP Query String feature and the HTTP Form feature.

The structure's object allows for storing the pointer to an application's Key string and the pointer to its Value string's equivalent key. The string's length must also be saved in the object.

HTTP Client Extended Key-Value Pair (HTTPc_KEY_VAL_EXT)

Extended Key-Value Pair Objects can be used with the HTTP Form feature. More specifically, with a multipart type form.

Extended Key-Value Pair Objects are very similar to the Key-Value Pair Objects except that the value pointer is replaced by a hook function that will allow the application to directly copy the value into the µC/HTTP-client buffer.

HTTP Client Multipart File (HTTPc_MULTIPART_FILE)

Multipart File Objects can be used with the HTTP Form feature. More specifically, with a multipart type form.

The structure's object allows it to store a pointer to the strings file name, the HTTP Content Type of the file and the hook function pointer that will be used to read the file into the transmit buffer.

HTTP Client Header (HTTPc_HDR)

This structure is used by the application to add Header Fields to an HTTP request.

  • No labels