Skip to content
Myr

use session's hooks as defaults for every requests.

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

authored by Rolando Espinoza La fuente · committed by Rolando Espinoza La fuente · parent 89241c5 · Browse files · 1 file+4 added−0 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+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:requests/sessions.py+4 added
138 unmodified lines
139 data = {} if data is None else data140 files = {} if files is None else files141 headers = {} if headers is None else headers142 params = {} if params is None else params143 hooks = {} if hooks is None else hooks144 # use session's hooks as defaults145 for key, cb in self.hooks.iteritems():146 hooks.setdefault(key, cb)147148 # Expand header values.149 if headers:150 for k, v in headers.items() or {}:
129 unmodified lines