nn::http::Connection::GetHeaderField Member Functionnn::Result GetHeaderField( const char * pLabel, char * pFieldBuf, size_t bufSize, size_t * pFieldLengthCourier = NULL ) const;
| Name | Description | |
|---|---|---|
| in | pLabel | Label name. |
| out | pFieldBuf | Buffer that stores the field value. |
| in | bufSize | Data size of pFieldBuf. |
| out | pFieldLengthCourier | Buffer that stores the data size of the field value. This argument can be omitted if you don't need the data size of the field value. |
Gets the field value that matches the specified label. This field value is obtained from the message header of the HTTP response that was received.
This function will block until the header is completely received. The receive operation completes if the following conditions are met.
・ All header data has been received.
・ The operation was cancelled.
・ A communication error occurred (for example, DNS name resolution failed).
If the header was already completely received by another function, this function will return the response immediately.
Note: If the pFieldBuf size is smaller than the field value size, as much data is stored in pFieldBuf as will fit, and the field value size is stored in pFieldLengthCourier.
Note: If pFieldBuf==NULL or bufSize==0, and if pFieldLengthCourier!=NULL, the field length is stored in pFieldLengthCourier.
Note: Unlike GetHeaderField , this function does not have an attached timeout. In other words, the process will not return from this function until processing has ended.
For this reason, in environments where communications are slow you can expect a long time to pass before the process ends and returns from this function.
CONFIDENTIAL