3

I have to implement a curl command similar to this curl -XPOST -u $(<creds) -H "Accept:application/*+xml" --resolve 'xyz.ddns.net:443:12.222.22.222' https://xyz.ddns.net/api/keys in python. I have done a lot of research but can not find a way of implementing the --resolve domain:port:ip flag using Requests library

Zaid Waseem
  • 341
  • 1
  • 4
  • 13
  • I believe you can find your answer here: https://stackoverflow.com/questions/22609385/python-requests-library-define-specific-dns – mechanical_meat Feb 21 '20 at 15:41
  • The `--resolve` flag works slightly differently from the usual DNS override. I believe it only maps a single pair to the the IP (as opposed to all ports of that host) – rdas Feb 21 '20 at 15:45

0 Answers0