Add support for basic auth?
erikbos opened this issue · 4 comments
erikbos commented
Fun tool! It would be great if http basic auth would be supported via cli as well
nakabonne commented
@erikbos Hi, thank you for your interest! You can use the -H
option to set HTTP headers.
$ echo -n 'user:pass' | base64
dXNlcjpwYXNz
$ ali -H "Authorization:Basic dXNlcjpwYXNz" http://host.xz
erikbos commented
Indeed that works.. just saying that something like -u user:passwd
would be nice to have. Yes, I am lazy :-)
brenol commented
@erikbos you can also use this way (which also works on browsers!):
ali http://myuser:mypassword@host.xz
@nakabonne perhaps adding this to README is a good idea?