guzzlehttp/guzzle

丌官凯康
2023-12-01
composer require guzzlehttp/guzzle:~6.0

1:引入

use GuzzleHttp\Client;

2:使用

$client = new Client(['timeout' => 5, 'verify' => false]);  //verify不校验https
$response = $client->request('POST',$base_url,[
    'json' => $body
]);
return json(json_decode($response->getBody(),true));

 

 类似资料: