I'm trying to run both my API and my client in the same Vagrant VM. In the client I'd like to use Guzzle. When I try to set up a simple test, I get the following error from curl:
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message '[curl] (#6) See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of cURL errors [url]
When I use a Github url instead, it all works fine. One thing I'm sure of, is that there is no typo in my url.
I have both client and API pointing to the ip-address of my VM, and both run fine separately.
I also ran into a topic on which it was suggested to use a cacert.pem certificate in php.ini, which I have tried, but it didn't work.
Any that knows how to solve this?
The error number 6 (CURLE_COULDNT_RESOLVE_HOST) means that libcurl failed to resolve a host name to an IP address.
Stupid of me. I had to place 127.0.0.1 api.dev in the hosts file on my VM.