Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94698

Using requests with an Authorization header?

Newsgroups comp.lang.python
Date 2015-07-28 08:34 -0700
Message-ID <f6254791-7816-4a9c-8260-b536af42e36d@googlegroups.com> (permalink)
Subject Using requests with an Authorization header?
From devnzyme1@use.startmail.com

Show all headers | View raw


Has anyone ever used an authorization header with the requests library?  I tried using:


>>> from requests.auth import HTTPBasicAuth
>>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass')

from their docs online but that's not working and I don't see anything about authorization headers



http://docs.python-requests.org/en/latest/user/authentication/#basic-authentication

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Using requests with an Authorization header? devnzyme1@use.startmail.com - 2015-07-28 08:34 -0700
  Re: Using requests with an Authorization header? Chris Angelico <rosuav@gmail.com> - 2015-07-29 01:49 +1000
  Re: Using requests with an Authorization header? dieter <dieter@handshake.de> - 2015-07-29 08:01 +0200

csiph-web