我正在使用 Laravel 5.1 和 Guzzlehttp 6.1 向clevertap 发出发布请求。
$client = new \GuzzleHttp\Client(['headers' => ['X-CleverTap-Account-Id' => '**********','X-CleverTap-Passcode'=>'*************8']]);
$result = $client->request('POST','https://api.clevertap.com/1/upload',["d"=>[
"identity"=>"1189549",
"ts"=>1419421212,
"type"=>"profile",
"profileData"=>[
"Name"=>"Jack Montana",
"Email"=>"jack@gmail.com",
"Phone"=>"+14155551234",
"Gender"=>"M",
"Employed"=>"Y",
"Education"=>"Graduate",
"Married"=>"Y",
"Age"=>28,
"Customer Type"=>"Platinum",
]]]);
我收到以下错误。
客户端错误:
POST https://api.clevertap.com/1/upload
导致400 Bad Request
响应:{“状态”:“失败”,“错误”:“有效负载是强制性的”}