Request with Symfony HttpClient returns code 0, when the same request with postman works fine Request with Symfony HttpClient returns code 0, when the same request with postman works fine docker docker

Request with Symfony HttpClient returns code 0, when the same request with postman works fine


In reference to your comment, your MERCURE_PUBLISH_URL .env variable must indeed refer to your Mercure container, but there's no need for the port indication. If the name of your Mercure container is "mercure", the environment variable should be set like so :

MERCURE_PUBLISH_URL=http://mercure/.well-known/mercure

(Replace http by https if your connection is secured)


Alright guys it's working now. In fact the correct url is MERCURE_PUBLISH_URL=http://mercure:3000/.well-known/mercureSo if you're using Docker Containers make sure to pass the correct host + the port and give your mercure containers the network of your other containers (internal in my case).