我知道这个问题被问过很多次,但是我没有找到答案。 我有这个cURL呼叫:
COVEREDRATIO
在我的测试方法中,我有这个:
$curl = curl_init();
$post_data = "{'application_token':'aksjnhksdbfjsbkdjfkjdhf','client_company_name':'TEST COMPANY','client_email':'test@test.ro','client_phone_number':'012000000','client_cui':'1234567','client_chosen_option':'BEST OPTION','registration_number':'36230'}";
curl_setopt($curl, CURLOPT_URL, 'http://website.ro/test/api/test');
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'
));
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($curl), 1);
curl_close($curl);
var_dump($result);
我的结果输出始终是错误一。有人可以帮我吗?