【原创】GuzzleHttp对xml的处理

$param = [
    'headers' => ['Accept' => 'application/xml'],
    'verify' => false
];
$url = 'https://xxxxx';
$response = $this->http->get($url, $param);
$body = $response->getBody()->getContents();
print_r($body);

参考文章:https://mlog.club/article/3011591

 

 

点赞

发表回复

电子邮件地址不会被公开。必填项已用 * 标注