i has a example code in php for getting result from curl but when i try call the function on c# i never get the result like php did
this is a code in php
$url = "http://localhost/ws/init.php";
$ch=curl_init();
curl_setopt($ch, CURLOPT_POST ,1);
$header=array();
$header[]='Content-Type: application/json';
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
$data = json_encode($data);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$result=curl_exec($ch);
curl_close($ch);
return $result;
this is the result from php
{"error_code":"0","error_desc":"","data":{"token":"xyx"}}
i try using libcurl.net,HttpClient,WebRequest, and WebClient for getting the result like php code did but till now i still out of luck maybe someone can help me for solved this problem?
i appreciated with ur help guys
thanks you before