[Tizen Application-dev] Issues with POST request

Sarath C csarath at gmail.com
Fri Sep 27 15:39:13 GMT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/application-dev/attachments/20130927/56786db0/attachment.html>


More information about the Application-dev mailing list