[Tizen Application-dev] Issues with POST request

Sarath C csarath at gmail.com
Mon Sep 30 16:01:50 GMT 2013


Yes. POST resolved the issue. In fact I was confused with WriteBody
function and HttpEntity as well. Missed this minor mistake.

Thank you.

-- at sarat <http://twitter.com/sarat>


On Mon, Sep 30, 2013 at 7:12 AM, Yoon, Youngsik <youngsik.yoon at intel.com>wrote:

>  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-bounces at lists.tizen.org [mailto:
> application-dev-bounces at lists.tizen.org] *On Behalf Of *Sarath C
> *Sent:* Saturday, September 28, 2013 12:39 AM
> *To:* application-dev at 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>****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/application-dev/attachments/20130930/c1089a73/attachment.html>


More information about the Application-dev mailing list