nn::http::Connection::AddPostDataAscii Member Functionnn::Result AddPostDataAscii( const char * pLabel, const char * pValue );
| Name | Description | |
|---|---|---|
| in | pLabel | Label name of the data. |
| in | pValue | Data content. |
Result 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. Use this function carefully to not conflict with such POST data configuration. (To reconfigure POST data, first call the Connection class's Finalize function, and then call Initialize again.) |
| ResultOutOfMemoryErr | Could not allocate 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 a Connection class instance for which the target URL is not assigned. The function has not done anything as it has been called on a Connection instance for which you have not yet successfully called 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 POST data before Connecting (for ASCII strings).
Adds POST data (ASCII strings) to send through an HTTP request.
Use this function for the settings that are active before running Connect. The POST data is sent by running the Connect function after configuring the settings.
If data with the same label is already added before the call, the data is updated. (In other words, if data with the same label is added twice, the old value is deleted before the new value is added.)
If all POST data is set using only the AddPostDataAscii function, the labels and the data of the outgoing data are both encoded before they are sent. (In this case, the Content-Type value in the HTTP header is set to "x-www-form-urlencoded".)
If any of the data (even a single item) 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