title: Guzzle and docker
body: <p>I am using laravel as my framework with passport and guzzle installed. I am trying to get a password grant token from the server for my iPhone app that I am developing. This is how I am calling the api for the grant token</p>
  
  <pre><code>$http = new GuzzleHttp\Client;
  
  $response = $http-&gt;post('http://your-app.com/oauth/token', [
      'form_params' =&gt; [
          'grant_type' =&gt; 'password',
          'client_id' =&gt; 'client-id',
          'client_secret' =&gt; 'client-secret',
          'username' =&gt; 'taylor@test',
          'password' =&gt; 'my-password',
          'scope' =&gt; '',
      ],
  ]);
  
  return json_decode((string) $response-&gt;getBody(), true);
  </code></pre>
  
  <p>When I call this with all the correct data I get this error from the console.</p>
  
  <pre><code>GuzzleHttp\Exception\ConnectException: cURL error 7: 
  Failed to connect to studious.test port 80: Connection refused (see 
  http://curl.haxx.se/libcurl/c/libcurl-errors.html) in file /var/www/your-app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 185
  </code></pre>
  
  <p>I am also using Laradock for development and I have both your-app.com and www.your-app.com in my hosts file. From my research it seems that this could be a error due to some dns stuff. Not sure what in the world is going on with this.</p>
  
  <p>In my host file I tried both putting my url with and with out the www.</p>