Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

yarl (0.8.1) not compatible and not able to add http headers #124

Open
zpoint opened this issue Mar 24, 2017 · 1 comment
Open

yarl (0.8.1) not compatible and not able to add http headers #124

zpoint opened this issue Mar 24, 2017 · 1 comment

Comments

@zpoint
Copy link

zpoint commented Mar 24, 2017

yarl (0.8.1) aio-libs/yarl#9

File "/usr/local/lib/python3.5/dist-packages/aioes/connection.py", line 41, in perform_request
    url = self._base_url.with_path(url)
AttributeError: 'URL' object has no attribute 'with_path'

I update aiohttp to 2.0.3 slove the "with_path" problem

And
I am not able to add http headers when I perform http request in es operation
I want to pass header as argument when instantiate the es client

headers = {"Host": u"***", "key": "***"}
es = Elasticsearch(['localhost:8888'], headers=headers)

TypeError: __init__() got an unexpected keyword argument 'headers'

with elasticsearch==5.1.0, I can do that
Now
I need to reserve header argument in connection.py->Connection->perform_request, and reserve for every method/class using it

@zpoint
Copy link
Author

zpoint commented Mar 24, 2017

aioes delete_by_query use something like this DELETE twitter/_query

not compatible with latest document

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html

POST twitter/_delete_by_query

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant