I have a url like this:
http://site/account/login/
I want to do this through command-line, without form.
import requests
requests.get(url, auth=('username-goes-here', 'password-goes-here'))
But how do I design my views function in Pyrmaid using Cornice?
@user.get()
def login(request):
I don't see the auth
tuple appears in requests.GET
at all. I need to be able to get those parameters out...
Any idea?
You can use HTTP headers to pass authentication token. See http://cornice.readthedocs.org/en/latest/tutorial.html