Modernize hostingsvcs.service.URLRequest
Review Request #8909 — Created April 21, 2017 and submitted
The
URLRequest
initializer was using a mutable object ({}
) for its
default value of its headers parameter, which would persist to other
requests if it was modified. We now use a default value ofNone
and
change it to an empty dict in the method call.Documentation has been added for the class and its methods.
Built the docs and read through them.
Ran unit tests.
- Change Summary:
-
Addressed Christian's issues
- Diff:
-
Revision 2 (+31 -2)
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
- Change Summary:
-
Undo super()
- Diff:
-
Revision 3 (+32 -2)
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
- Description:
-
The
URLRequest
initializer was using a mutable object ({}
) for itsdefault value of its headers parameter, which would persist to other requests if it was modified. We now use a default value of None
andchange it to an empty dict in the method call. - Additionally, it was invoking the base class
__init__
method instead- of using super()
. This, too, has been corrected.- Documentation has been added for the class and its methods.