-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add RequestConfig support to RequestOptions #57972
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
Add RequestConfig support to RequestOptions #57972
Conversation
@jbaiera hi,jbaiera, can you help to review this PR. |
Pinging @elastic/es-core-features (:Core/Features/Java Low Level REST Client) |
@jasontedor hi,jasontedor, can you help to review this PR. |
@jakelandis Can you help find someone to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR on this. I left just one quick bit of feedback on the documentation code snippet to hopefully make it a bit easier to read.
client/rest/src/test/java/org/elasticsearch/client/documentation/RestClientDocumentation.java
Outdated
Show resolved
Hide resolved
@elasticmachine ok to test |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks again!
Different kinds of requests may need different request options from the client default. Users can optionally set RequestConfig on a single request's RequestOptions to override the default. Without this, socketTimeout can only set at RestClient initialization.
Different kinds of requests may need different request options from the client default. Users can optionally set RequestConfig on a single request's RequestOptions to override the default. Without this, socketTimeout can only set at RestClient initialization. Co-authored-by: weizijun <[email protected]>
As RequestOptions add RequestConfig, users can set some request config per request, e.g socketTimeout.
Without RequestConfig, socketTimeout can only set in RestClient init.
As different kind of request maybe have different request options, users can set RequestConfig Optional.