kopia lustrzana https://github.com/ihabunek/toot
Apply requests environment settings
Allows use of enironment variables for setting proxies and trusted CAs. See: http://docs.python-requests.org/en/master/user/advanced/#prepared-requestspull/83/head
rodzic
9d10ce22f1
commit
226713a5a0
|
@ -8,7 +8,8 @@ def send_request(request, allow_redirects=True):
|
|||
|
||||
with Session() as session:
|
||||
prepared = session.prepare_request(request)
|
||||
response = session.send(prepared, allow_redirects=allow_redirects)
|
||||
settings = session.merge_environment_settings(prepared.url, {}, None, None, None)
|
||||
response = session.send(prepared, allow_redirects=allow_redirects, **settings)
|
||||
|
||||
log_response(response)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue