Languages

Menu
Sites
Language
Passing parameters in http post method for tizen native applications,

Hello App Developers,

 

In my application am going to call http requests that is get method and post method. 

I have referred this link "https://developer.tizen.org/development/guides/native-application/connectivity-and-wireless/internet-and-contents-downloads/http". 

This works fine for get method as well as for post method. I am getting responce from server. 

but here i am not passing parameters properly so am not getting success response for post method. 

like this am going to pass the parameters
 
const char* post_msg = "email=abcd@gmail.com&password=12312345678";
 
 
So can anyone help me on this?
 
Thanks in advance.

 

 

Responses

3 Replies
Yasin Ali

Hi,

Below is details about http_transaction_request_write_body =>

int http_transaction_request_write_body

(

http_transaction_h

http_transaction,

   

const char *

body

 

)

   

Writes the request message body.

This function writes the request message body in the internal queue.
The written queue for request body is uploaded after invoking
http_transaction_submit().

Since :  3.0 CHECK API VERSION

Parameters:

[in]

http_transaction

The HTTP transaction handle

[in]

body

The message body data

Returns:

0 on success, otherwise negative error value

Return values:

HTTP_ERROR_NONE

Successful

HTTP_ERROR_INVALID_PARAMETER

Invalid parameter

HTTP_ERROR_INVALID_OPERATION

Invalid operation

HTTP_ERROR_NOT_SUPPORTED

Not Supported

 

As you passing coded info you try with

const char* post_msg = "email=abcd&password=12312345678";

first to check its working.

Hope it will help you. It would be better if you share some of your code.

If you find my post is helpful for you, please mark it as answer to promote this post to others.

 

Mick Caberos

Hpavithra gowda im new at tizen and im trying that link that you posted but i cant. can you share or teach me? please need badly and thanks

 

Armaan-Ul- Islam