此代码:
try {
// creating webservice access
$webService = new PrestaShopWebservice('https://149.28.159.206/', '6DE5PU9M9SC7RZCRFF4VK3MFDVVTGRJT', false);
// call to retrieve all customers
$xml = $webService->get(['resource' => 'products']);
} catch (PrestaShopWebserviceException $ex) {
// Shows a message related to the error
echo 'Other error: <br />' . $ex->getMessage();
}
正在返回以下错误:
Other error: <br />Bad HTTP response
而且我已经使用适当的权限激活了密钥(请参阅所附的屏幕截图)。但是,它给出了此错误。
我可以知道为什么,如何解决这个问题?
我正在从vultr.com云实例在Ubuntu 18.04 x64上使用Prestashop 1.7.6.5。
Prestashop将Domain / api用于网络服务。