Add a header to the request headers stored in HTTPRequestHeaders_t.pBuffer.
Upon return, pRequestHeaders->headersLen will be updated with the number of bytes written.
Headers are written in the following format:
The trailing \r\n
that denotes the end of the header lines is overwritten, if it already exists in the buffer.
\r
, \n
, and :
are not present in pValue
or pField
. :
is allowed in pValue
.[in] | pRequestHeaders | Request header buffer information. |
[in] | pField | The header field name to write. The data should be ISO 8859-1 (Latin-1) encoded per the HTTP standard, but the API does not perform the character set validation. |
[in] | fieldLen | The byte length of the header field name. |
[in] | pValue | The header value to write. The data should be ISO 8859-1 (Latin-1) encoded per the HTTP standard, but the API does not perform the character set validation. |
[in] | valueLen | The byte length of the header field value. |
pField
or pValue
.)Example