coreHTTP v3.1.1
HTTP/1.1 Client Library
 
Loading...
Searching...
No Matches
HTTPClient_SendHttpHeaders
HTTPRequestHeaders_t * pRequestHeaders,
size_t reqBodyLen,
uint32_t sendFlags );
HTTPStatus_t HTTPClient_SendHttpHeaders(const TransportInterface_t *pTransport, HTTPClient_GetCurrentTimeFunc_t getTimestampMs, HTTPRequestHeaders_t *pRequestHeaders, size_t reqBodyLen, uint32_t sendFlags)
Send the request headers in pRequestHeaders over the transport.
Definition: core_http_client.c:1926
uint32_t(* HTTPClient_GetCurrentTimeFunc_t)(void)
Application provided function to query the current time in milliseconds.
Definition: core_http_client.h:463
HTTPStatus_t
The HTTP Client library return status.
Definition: core_http_client.h:196
Represents header data that will be sent in an HTTP request.
Definition: core_http_client.h:365
The transport layer interface.
Definition: transport_interface.h:299

Send the request headers in pRequestHeaders over the transport.

If HTTP_SEND_DISABLE_CONTENT_LENGTH_FLAG is not set in parameter sendFlags, then the Content-Length to be sent to the server is automatically written to pRequestHeaders. The Content-Length will not be written when there is no request body. If there is not enough room in the buffer to write the Content-Length then HTTPInsufficientMemory is returned. Please see HTTP_MAX_CONTENT_LENGTH_HEADER_LENGTH for the maximum Content-Length header field and value that could be written to the buffer.

The application should close the connection with the server if any of the following errors are returned:

Parameters
[in]pTransportTransport interface, see TransportInterface_t for more information.
[in]getTimestampMsFunction to retrieve a timestamp in milliseconds.
[in]pRequestHeadersRequest configuration containing the buffer of headers to send.
[in]reqBodyLenThe length of the request entity in bytes.
[in]sendFlagsFlags which modify the behavior of this function. Please see HTTPClient_Send Flags for more information.
Returns
HTTPSuccess if successful. If there was a network error or less bytes than what were specified were sent, then HTTPNetworkError is returned.