0
一个简单的请求工作正常。这是代码片段。连接尝试失败,因为连接方在cakephp中一段时间后没有正确响应2.6.7
$link = 'http://www.api2apipro.live/' . 'rest_payments.json';
$httpSocket = new HttpSocket();
$response = $httpSocket->post($link, $this->request->data);
这里$this->request->data
是一个数组。现在它显示以下错误:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
我找到了原因。我无法浏览http://www.api2apipro.live从我的IP意味着我不允许从我的本地服务器访问此URL。但是有没有任何技巧来语法解锁这个访问?