I am facing problem with HTTP POST request. I could not find any help over Internet forums. I use following code for submitting the request to my web server but I says my request doesn't contain any post data.


pHttpRequest = const_cast<HttpRequest*>(pHttpTransaction->GetRequest());


r = pHttpRequest->SetUri(requestUrl);

TryCatch(r == E_SUCCESS, , "Failed to set the uri.");


r = pHttpRequest->SetMethod(NET_HTTP_METHOD_GET);

TryCatch(r == E_SUCCESS, , "Failed to set the method.");


pHttpStringEntity = new HttpStringEntity();


r = pHttpStringEntity->Construct(postData.GetPointer());

if( r == E_SUCCESS )

AppLog("Http Entity set - E_SUCCESS");

else if (r == E_INVALID_ENCODING_RANGE)

AppLog("Http Entity set - E_INVALID_ENCODING_RANGE");

else

AppLog("Http entity set - E_SYSTEM");


r = pHttpRequest->SetEntity(*pHttpStringEntity);


if( r == E_SUCCESS)

AppLog("SetEntiry = E_SUCCESS");


r = pHttpTransaction->Submit();

TryCatch(r == E_SUCCESS, , "Failed to submit the HttpTransaction.");


-- 
Sarath C
Sent with Airmail
_______________________________________________
Application-dev mailing list
Application-dev@lists.tizen.org
https://lists.tizen.org/listinfo/application-dev

Reply via email to