已经 GOOGLE 一整天了 关于 Guzzle 6 的问题 如何 SEND REQUEST WITH xml FILE AS PARAMETER?
请问下各位 有人使用过 Guzzle 6 去call 第三方 API 吗?
第三方 API 给的 要求是 需要用 XML 去传参数, 请问有人有这方面经验吗?
$myXml = fopen("shipping/eshipping.xml","r");
$client = new \GuzzleHttp\Client([
]);
$response = $client->request('POST', $uri, ['body'=>$myXml]);
echo $response->getStatusCode();
// return 200, means successfully called the api
echo (string)$body;
// empty on page.
推荐文章: