Alternative to cURL connect-to

Viewed 106

This endpoint of an API works fine like so:

curl -s -G \
  --connect-to "mumbai403::103.150.187.3:" \
  --cacert "ca.rsa.4096.crt" \
  --data-urlencode "pt=mytoken" \
  --data-urlencode "pubkey=mypubkey" \
  "https://mumbai403:1337/addKey"

However, if I remove the connect-to and directly provide the IP, there's no response:

curl -s -G \
    --cacert "ca.rsa.4096.crt" \
    --data-urlencode "pt=mytoken" \
    --data-urlencode "pubkey=mypubkey" \
    "https://103.150.187.3:1337/addKey"

Why doesn't it work without connect-to? The reason I need to get rid of it is because I'm not sure how to translate that request to make it work in Postman and elsewhere.

1 Answers
Related