How do i using Http Post Request?

How do i using Http Post Request?

BY 07 Apr 2013 Native Application Development
​Dear All,

I want to using Http Post request for implement some functions.

But, I can’t using Http Post Request. 

It looks like HttpStringEntity is not working. How about you? Server side tell me that “entity is empty”. What’s wrong?

Please check below my code.

HttpTransaction * pTransaction = mHttpSession->OpenTransactionN();
pTransaction->AddHttpTransactionListener(*this);

HttpRequest * pRequest = pTransaction->GetRequest();

pRequest->SetUri(url);
pRequest->SetMethod(NET_HTTP_METHOD_POST);

HttpHeader * pHeader = pRequest->GetHeader();
string he = oAuthHeader.substr(15).c_str();
String header = he.c_str();
pHeader->AddField("Authorization", header);

HttpStringEntity * pEntity = new HttpStringEntity();
pEntity->Construct(args);
pRequest->SetEntity(*pEntity);

pTransaction->SetUserObject(userObjects);
pTransaction->Submit();
Written by