Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Error occurs in ElasticSearch.connection.perform_request aio-libs-abandoned#162
  • Loading branch information
pjongy authored Apr 29, 2019
1 parent 4d68f7a commit 07866df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aioes/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def close(self):
return self._session.close()

@asyncio.coroutine
def perform_request(self, method, url, params, body):
def perform_request(self, method, url, params, body, headers={"Content-type":"application/json"}):
url = self._base_url.with_path(url)
resp = yield from self._session.request(
method, url, params=params, data=body)
method, url, params=params, data=body, headers=headers)
resp_body = yield from resp.text()
if not (200 <= resp.status <= 300):
extra = None
Expand Down

0 comments on commit 07866df

Please sign in to comment.