-
Notifications
You must be signed in to change notification settings - Fork 270
[DOCS] Rest 5 client fixes #1047
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
base: main
Are you sure you want to change the base?
Conversation
🔍 Preview links for changed docs |
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.
Pull Request Overview
This PR updates the Java Rest 5 client documentation to fix stale details and improve clarity. The changes address outdated API references, improve explanations of timeout configurations, and enhance authentication documentation.
- Updates timeout configuration examples to use current API methods and clearer explanations
- Improves basic authentication documentation with better descriptions and current API references
- Adds cross-references and enhances formatting for better readability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
docs/reference/transport/rest5-client/config/timeouts.md | Updates timeout configuration examples and adds detailed explanations of different timeout types |
docs/reference/transport/rest5-client/config/basic_authentication.md | Improves basic authentication documentation with clearer explanations and updated API references |
Co-authored-by: Copilot <[email protected]>
@l-trotta please check this for accuracy! ty and no rush |
.setHttpClientConfigCallback(c -> c.setDefaultConnectionConfig( | ||
ConnectionConfig.custom() | ||
.setConnectTimeout(Timeout.ofSeconds(10)) | ||
.build() |
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.
can't this just be done like the following, to avoid the extra connection config?
Rest5ClientBuilder builder = Rest5Client
.builder(new HttpHost("localhost", 9200, "http")) <1>
.setConnectionConfigCallback(connectConf -> connectConf
.setConnectTimeout(Timeout.ofSeconds(10))
.setSocketTimeout(Timeout.ofSeconds(10)))
.setRequestConfigCallback(...)
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.
Don't know (this was just placeholder code), so happy to make this change.
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.
yep with the latest changes it can!
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.
everything else LGTM, thanks a lot for this @marciw <3
Update stale details in the Java Rest 5 client docs (see linked issues). Also did a general edit for clarity, style, etc.
Closes
elastic/docs-content#2120 and
elastic/docs-content#2121
preview links
docs/reference/transport/rest5-client/config/basic_authentication.md
docs/reference/transport/rest5-client/config/timeouts.md