:param **kwargs: Optional arguments that ``request`` takes.
"""
- return request('GET', url, **kwargs)
+
kwargs.setdefault('allow_redirects', True)
return request('GET', url, **kwargs)
- if "allow_redirects" not in kwargs:
- kwargs["allow_redirects"] = True
-
- return request('get', url, **kwargs)
def head(url, **kwargs):
:param **kwargs: Optional arguments that ``request`` takes.
"""
- return request('HEAD', url, **kwargs)
kwargs.setdefault('allow_redirects', True)
return request('HEAD', url, **kwargs)
- if "allow_redirects" not in kwargs:
- kwargs["allow_redirects"] = True
-
- return request('head', url, **kwargs)
def post(url, data='', **kwargs):
while (
('location' in r.headers) and
- ((self.method in ('GET', 'HEAD')) or
- (r.status_code is codes.see_other) or
- (self.allow_redirects))
((r.status_code is codes.see_other) or (self.allow_redirects))
- ((r.status_code is codes.see_other) or
- (self.allow_redirects))
):
r.fo.close()