-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
High Level Rest client should use POST when we have body #28326
Comments
Makes sense. What I had in mind was to have an option that lets you choose between GET and POST, like other language clients do. Or switching to POST like you proposed. |
The use of bodies in HTTP GET requests is a little unusual. Although the spec is not crystal clear on the subject, it is possible to read it in a way that means the body of a GET request can and should be ignored: https://stackoverflow.com/a/983458 |
@DaveCTurner I don't think this is the right place to discuss what our API should support. Our API supports both, we always had a preference for |
Sorry, I didn't mean to open that debate. Supporting both on the API side seems fine. Just wanted to say that a proxy that doesn't pass the body through on a What'd be the disadvantage of completely switching to |
Completely switching to |
All low level clients either allow you to either pass any HTTP method or expose all the API + allowed http method combinations. Defaulting to In some cases |
Cool thanks for the feedback let's do |
…ch support request body It has been pointed out that GET with body may cause problems to some proxies. We are then switching to POST the API that retrieve info and support a request body. Closes elastic#28326
@javanna Please advise when would this be released? |
@asmita2201 you can check the labels of the PR that closed this issue: #28342 . It will be released with 6.3.0. Unfortunately the change went in a tiny bit too late for 6.2 . |
@asmita2201 I am now wondering if we should have merged this as a bug and backported to 6.2 branch (at least it would be released with 6.2.1) and maybe also to 5.6 (it would go out with 5.6.8). I take it that this is a blocker for you? |
Actually I was trying to use 6.3.0 for this change and maven is not able to download the JAR. Is this available?
IF yes, can you please provide the actual JAR?
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.3.0</version>
</dependency>
From: Luca Cavanna [mailto:notifications@github.com]
Sent: Wednesday, January 31, 2018 11:00 AM
To: elastic/elasticsearch
Cc: Singh, Asmita; Mention
Subject: Re: [elastic/elasticsearch] High Level Rest client should use POST when we have body (#28326)
@asmita2201<https://github.com/asmita2201> I am now wondering if we should have merged this as a bug and backported to 6.2 branch (at least it would be released with 6.2.1) and maybe also to 5.6 (it would go out with 5.6.8). I take it that this is a blocker for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#28326 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AS0caEsD7-UTDuXpo2B68i7DUqnNFR-sks5tQI3wgaJpZM4RmSRt>.
|
@javanna - YEs please treat that as a blocker. We are unable to get the right JAR for this. |
@asmita2201 6.3.0 is not released yet, you can get a snapshot from |
@javanna can you advise how to access? |
@asmita2201 we just realized that some recent snapshots are missing in our snapshots repo. We are fixing that as we speak, will let you know once it's fixed so you can try again. |
@javanna could you please provide an ETA for this? |
hi @asmita2201 the snapshot artifacts should be back up. Yet the URL the I gave you above needs to be configured in your maven build, it is not directly accessible from a browser. |
@javanna Failure to find org.elasticsearch:elasticsearch-secure-sm:jar:6.3.0-SNAPSHOT in http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/00142c9 was cached in the local repository, resolution will not be reattempted until the update interval of elastic-lucene-snapshots has elapsed or updates are forced -> [Help 1] |
Hi @asmita2201 |
When elasticsearch is behind a Proxy and this Proxy does not support GET with body (which might be seen as a bug of the Proxy), people can't use our Java Rest Client as explained in https://discuss.elastic.co/t/es-cluster-via-proxy-ip-but-listener-timeout-after-waiting-for-30000-ms/116192/6
For example, the search Request here uses a GET method:
elasticsearch/client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java
Line 424 in b98514c
I think we should may be switch to POST instead anytime we might have a body.
Thoughts?
The text was updated successfully, but these errors were encountered: