We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to use interface option but it doesnt work. No error but gives me other interface's ip
var curl = new (require( 'curl-request' ))(); curl .setOpt('interface', 'eth0') .setHeaders([ 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36' ]) .get('www.wtfismyip.com/json') .then(({statusCode, body, headers}) => { console.log(statusCode,body) }) .catch((e) => { console.log(e); });
It works on command tool with curl. I get the right ip with that command;
sudo curl -s http://www.wtfismyip.com/text --interface eth0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to use interface option but it doesnt work. No error but gives me other interface's ip
It works on command tool with curl. I get the right ip with that command;
sudo curl -s http://www.wtfismyip.com/text --interface eth0
The text was updated successfully, but these errors were encountered: