I want to do a post (twitter in this case) with a oneliner.
If I don't have proxy
curl -u user:pass -d status="message" http://twitter.com/statuses/update.xml
works perfectly.
But when I am behind a authenticated proxy it doesn't.
I had tryied:
curl -X proxy:port -U proxyUser:proxyPass -u user:pass -d status="message" http://twitter.com/statuses/update.xml
That it jump me with an
proxy do not support basic auth
So do you know what I am doing wrong?
thanks in advance.
Cababunga's answer is correct, but they're missing another option: --proxy-ntlm
. Some proxies won't authorize correctly with --proxy-anyauth
, so ideally you'll want to specify the authentication method that your proxy uses. If you run curl -v -U user:pass -x proxy:port --url http://www.google.com
, you should get something along the lines of the following:
Add a flag for whatever you see in the Proxy-Authenticate parameter and you should be good to go. In this example, you would add the --proxy-ntlm
flag.
You may be able to put the username/password in the URL for the authenticated resource to avoid having extra command line complications.
http://username:[email protected]/statuses/update.xml
also, the --proxy shortcut is a lowercase x, as cababunga pointed out.
curl -x proxyaddr:port -U proxyUser:proxyPass -u user:pass -d status="message" http://twitter.com/statuses/update.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With