Skip to content

Commit

Permalink
fix(Client/Index/Transport): Make request_options optional (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
PLNech authored Nov 6, 2017
1 parent c898c82 commit faa9443
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion algoliasearch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def is_alive(self, request_options=None):
"""
return self._req(True, '/1/isalive', 'GET', request_options)

def _req(self, is_search, path, meth, request_options, params=None, data=None):
def _req(self, is_search, path, meth, request_options=None, params=None, data=None):
if len(self.api_key) > MAX_API_KEY_LENGTH:
if data is None:
data = {}
Expand Down
2 changes: 1 addition & 1 deletion algoliasearch/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ def search_rules(self, query=None, anchoring=None, context=None, page=None, hits

return self._req(True, '/rules/search', 'POST', request_options, data=params)

def _req(self, is_search, path, meth, request_options, params=None, data=None):
def _req(self, is_search, path, meth, request_options=None, params=None, data=None):
"""Perform an HTTPS request with retry logic."""
path = '%s%s' % (self._request_path, path)
return self.client._req(is_search, path, meth, request_options, params, data)
2 changes: 1 addition & 1 deletion algoliasearch/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _get_hosts(self, is_search):
else:
return self._original_write_hosts

def req(self, is_search, path, meth, params, data, request_options):
def req(self, is_search, path, meth, params, data, request_options=None):
"""Perform an HTTPS request with retry logic."""

# Merge params and request_options params.
Expand Down

0 comments on commit faa9443

Please sign in to comment.