Skip to content
Myr

Use new authentication style in models

Before adoption: this commit came in with the history the project adopted, so no landing records it.

:metal:

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 06a5aed · Browse files · 1 file+11 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−2 removed

  • other:+11 added−2 removed

1 file+11 added−2 removed

modified:requests/models.py+11 added-2 removed
92 unmodified lines
93 #: :class:`Response <Response>` instance, containing94 #: content and metadata of HTTP Response, once :attr:`sent <send>`.95 self.response = Response()9697 # if isinstance(auth, (list, tuple)):97 if isinstance(auth, (list, tuple)):98 from .auth import http_basic99 auth = (http_basic, auth)100 # auth = AuthObject(*auth)101 # if not auth:102 # auth = auth_manager.get_auth(self.url)103
35 unmodified lines
139140 if self.cookies is not None:141 _handlers.append(urllib2.HTTPCookieProcessor(self.cookies))142141 # if self.auth:143144 # if not isinstance(self.auth.handler,145 # (urllib2.AbstractBasicAuthHandler,146 # urllib2.AbstractDigestAuthHandler)):147
201 unmodified lines
349 else:350 data = self._enc_data351 headers = {}352353 if self.auth:354 auth_func, auth_args = self.auth355356 r = auth_func(self, *auth_args)357358 self.__dict__.update(r.__dict__)359360 # Build the Urllib2 Request.361 req = _Request(url, data=data, headers=headers, method=self.method)362363 # Add the headers to the request.
199 unmodified lines