I'm using laradock
and I can access the page in browser http://localhost:8088/api/getakicks/get
without any problems.
But when I try to access it in controller I'm getting this error:
GuzzleHttp \ Exception \ ConnectException cURL error 7: Failed to connect to localhost port 8088: Connection refused
The code I use:
$client = new \GuzzleHttp\Client();
// Set various headers on a request
$client->request('GET', 'http://localhost:8088/api/getakicks/get');
changed the IP address from localhost:8088 to windows IP address 192.168.x.x:8088.