GuzzleHttp使用 发表于 2020-03-30 | 分类于 技术载入12use GuzzleHttp\Exception\GuzzleException;use GuzzleHttp\Client;获取远程xml123456789101112$client = new Client();#基础配置$options = [ 'headers' => [ 'Content-Type' => 'text/xml; charset=UTF8', ], 'body' => $xml,];$response = $client->request('POST',$URL,$options);$responseXML = $response->getBody()->getContents();获取远程文件123$client = new Client(['verify' => false]);$data = $client->request('get',$resURL)->getBody()->getContents();