Problem Description
I have a service running inside docker (docker running on my windows 10 machine)and is accessible through Traefik acting as a reverse proxy. "Host(pixel.docker.localhost)" is accessible over browser and postman. However, If I try to ping this from command line ping https://pixel.docker.localhost or try to access this pixel.docker.localhost over a get request using HttpClient in a .net console app running on my windows machine , I get error that "no such host exists".
I modified the host file on my windows machine and added an entry as below:
192.168.x.x pixel.docker.localhost
After adding this entry, I am able to ping https://pixel.docker.localhost as well as access this using HttpClient in a .net console app running on my windows machine.
Question
Why are browser and postman able to resolve pixel.docker.localhost without entry in host file but ping command from cmd and HttpClient fails to find this host ?