【发布时间】:2022-01-25 20:02:12
【问题描述】:
`我正在尝试使用 laravel 从外部 api 检索一些数据: 这是我的控制器
使用 Illuminate\Http\Request; 使用 Illuminate\Support\Facades\Http;
public function netvigie()
{
$response = Http::get('https://extranet.netvigie.com/fr/api/{token}/availability/{id}/getAnomaliesCount?format=json');
$data = json_decode($response->body(), true);
dd($data);
return view('ControlmAPI.netvigie');
}
But i have curl error 28 while it works in Postman. We have only 2 parameters which are token and product id that we enter directly in the url.
Someone can help me please ?
【问题讨论】: