Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Small optimization #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions python_http_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@ def __init__(self,
# These are the supported HTTP verbs
self.methods = ['delete', 'get', 'patch', 'post', 'put']
self._version = version
# _count and _url_path keep track of the dynamically built url
self._count = 0
self._url_path = {}
self._status_code = None
self._response_body = None
self._response_headers = None
self._response = None
self._reset(self)

def _reset(self):
"""Resets the URL builder, so you can make a fresh new dynamic call."""
# _count and _url_path keep track of the dynamically built url
self._count = 0
self._url_path = {}
self._status_code = None
self._response_body = None
self._response_headers = None
self._response = None

def _add_to_url_path(self, name):
Expand Down