I didn’t try the code.
Just think you should try pHttpRequest->SetMethod(NET_HTTP_METHOD_POST) instead 
of NET_HTTP_METHOD_GET.

Thanks,
Yoon

From: application-dev-boun...@lists.tizen.org 
[mailto:application-dev-boun...@lists.tizen.org] On Behalf Of Sarath C
Sent: Saturday, September 28, 2013 12:39 AM
To: application-dev@lists.tizen.org
Subject: [Tizen Application-dev] Issues with POST request

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<http://airmailapp.info/tracking>
_______________________________________________
Application-dev mailing list
Application-dev@lists.tizen.org
https://lists.tizen.org/listinfo/application-dev

Reply via email to