full JSON

This commit is contained in:
gnieark 2016-05-29 22:18:36 +02:00
parent ac7084ba39
commit 0ecdce5a84
2 changed files with 2 additions and 13 deletions

View File

@ -22,7 +22,6 @@ function get_IA_Response($iaUrl,$postParams){
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
echo '<p>'.$data_string.'</p>';
$output= curl_exec($ch);
curl_close($ch);

View File

@ -38,17 +38,7 @@ function get_IA_Response($iaUrl,$postParams){
//send params JSON as body
$data_string = json_encode($postParams);
/*
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $iaUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
*/
$ch = curl_init($iaUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
@ -59,6 +49,6 @@ function get_IA_Response($iaUrl,$postParams){
);
$output= curl_exec($ch);
curl_close($ch);
echo '<p>'.$data_string.'</p>';
return htmlentities($output);
}