0

I want to hit below curl command using postman

curl -k https://anthos.nalphatech.co.in/ping -v --resolve anthos.nalphatech.co.in:443:10.200.0.12 but when I import this it is not responding and give a message Could not send request but in Linux machine it is working as expected

Rohan jangid
  • 125
  • 3
  • 13
  • Postman can't handle the `--resolve` part. Thus it's trying to resolve `anthos.nalphatech.co.in` but cannot find a valid ip, thus cannot send the request. You can either use the correct ip in the request or update your /etc/hosts file – derpirscher Jun 07 '21 at 07:35
  • @DivyangDesai Did you try executing the request? The problem is the `--resolve` part which tells curl what IP to use for that host. This isn't (yet?) supported in postman, thus postman won't be able to resolve this address ... – derpirscher Jun 07 '21 at 07:59
  • @derpirscher is there any other way so i can test my api response – Rohan jangid Jun 07 '21 at 09:41
  • Like said above: Postman needs to determine the IP address it should connect to. There are only 2 ways: 1) you use the IP instead of the hostname in the request, 2) you make that hostname resolve to the correct IP at least on your system (via `/etc/hosts`) – derpirscher Jun 07 '21 at 09:46
  • This would help in answering your question https://stackoverflow.com/a/68881736/20416874 – Tim Nov 11 '22 at 10:38

0 Answers0