📜  如果请求不成功,Laravel Http 客户端会抛出异常 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:42.789000             🧑  作者: Mango

代码示例1
$response = Http::withToken(Auth::user()->magento_access_token)->get('' . Auth::user()->magento_base_url . 'rest/V1/categories/');
        $response->throw();