nn::http::Connection::AddPostDataBinary Member Functionnn::Result AddPostDataBinary( const char * pLabel, const void * pValue, size_t valueSize );
| Name | Description | |
|---|---|---|
| in | pLabel | Label name of the data. |
| in | pValue | Data content. |
| in | valueSize | Data size of pValue. |
Result values listed below.| Value | Description |
|---|---|
ResultSuccess |
Process was successful. |
| ResultPostAddedAnotherErr | POST data has already been configured. The function returns this value when POST data of a different type has already been configured, or if adding POST data when in the SetLazyPostDataSetting mode. When calling this function, be sure to avoid conflicts with these POST data settings. (To reconfigure POST data, first call the Connection object's Finalize function, and then call Initialize again.) |
| ResultOutOfMemoryErr | Could not allocate a POST data buffer from the buffer configured by the nn::http::Initialize function. Adjust the total size of the POST data being registered simultaneously to fit within the the buffer configured by the nn::http::Initialize function. |
| ResultConnectionStatusErr | Error indicating an invalid state. This function cannot be called in the current communication state. (For example, the function returns this error if the system is already connected. You must call this function before calling Connect.) |
| ResultInvalidParamErr | Error indicating an invalid parameter. Specify valid values for all parameters and call this function again. |
| ResultNotConnectedErr | Error indicating that no target URL was assigned to the Connection object. No action performed because the Connection object has not been initialized by a successful call of Initialize. |
| ResultNotInitializedErr | Error indicating that the library is not initialized. None of this library's functions can be used until you first call nn::http::Initialize. |
| A value other than the above. | Unexpected error (See http_Result.h for details). |
Function used to configure binary POST data before Connecting.
Adds POST data (binary data) to send through an HTTP request.
Use this function for settings before running Connect.
The POST data is sent by running the Connect function after configuring the settings.
If data with the same label has already been added before the call to this function, this function updates the data.
(In other words, if data with the same label is added twice, the old value is deleted before the new value is added.)
If any of the data is set with AddPostDataBinary, all POST data is sent without being encoded.
(In this case, the Content-Type value in the HTTP header is set to "multipart/form-data".)
CONFIDENTIAL