Summary
It is possible to specify an IP address when using cURL. The "--resolve" option can be used to pin a request to an IP address
1
, while the "--connect-to" option can be used to connect to another host by name.
2
Additionally, the "--resolve" option can be used in conjunction with editing the hosts file to redirect the host to a localhost.
3
According to
See more results on Neeva
Summaries from the best pages on the web
Unable to generate a short snippet for this page, sorry about that.
Acquia
force.com
Summary
Curl is a powerful tool for generating HTTP requests that can be used to send requests to the wrong host. It can be used to fake the host header, connect to another host by name, and use the --resolve and --connect-to options to do this. Additionally, curl can be used to generate libcurl code for command lines, allowing for a more efficient and efficient way to generate curl code.
curl another host | daniel.haxx.se
haxx.se
Summary
Maybe you want the command curl http://example.com to connect to your local server instead of the actual server.
You can normally and easily do that by editing your hosts file ( /etc/hosts on Linux and Unix-like systems) and adding, for example, 127.0.0.1 example.com to redirect the host to your localhost. However
Name resolve tricks - Everything curl
curl.dev
Hello, I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a ...
Specifying IP address with curl/wget
unix.com
trying to send it over a specific port poes anyone know how to specify a port with curl? ... I need to post an xml file from a specific port and specific ip ...
How to specify a port with curl?
unix.com