Home » Docker
My API endpoint (for example http://localhost:3000) server running on Docker container. Initiated curl session in PHP (vagrant box) and the response was empty. Here is the code sample without proxy.
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
I then read docker networking docs and…Read More »