Link to home
Start Free TrialLog in
Avatar of iphone
iphone

asked on

how to POST data using httpurlconnection?

for example i want send a data:

String Sdata1 = "data1";
String Sdata2 = "data2";

how to send data1 and data2?

variables that use  at php code:
$data1
$data2

mybe if just using GET, i just set the URL to : http://www.a.com/test.php?data1=Sdata1&data2=Sdata2
,then connect();

but how if post?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and you don't need to use httpurlconnection
Avatar of iphone
iphone

ASKER

thx to you both all work
:-)