Skip to content

Commit 07866df

Browse files
authored
Error occurs in ElasticSearch.connection.perform_request aio-libs-abandoned#162
1 parent 4d68f7a commit 07866df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aioes/connection.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def close(self):
3737
return self._session.close()
3838

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

0 commit comments

Comments
 (0)