Skip to content

[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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

[DOCS] Rest 5 client fixes #1047

wants to merge 6 commits into from

Conversation

marciw
Copy link
Contributor

@marciw marciw commented Aug 9, 2025

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

Copy link

github-actions bot commented Aug 9, 2025

@marciw marciw requested review from l-trotta and Copilot August 11, 2025 21:47
Copy link

@Copilot Copilot AI left a 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

@marciw
Copy link
Contributor Author

marciw commented Aug 11, 2025

@l-trotta please check this for accuracy! ty and no rush

.setHttpClientConfigCallback(c -> c.setDefaultConnectionConfig(
ConnectionConfig.custom()
.setConnectTimeout(Timeout.ofSeconds(10))
.build()
Copy link

@marcreichman-pfi marcreichman-pfi Aug 12, 2025

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(...)

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

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

@marciw marciw changed the title [WIP] Rest 5 client fixes [DOCS] est 5 client fixes Aug 13, 2025
@marciw marciw changed the title [DOCS] est 5 client fixes [DOCS] Rest 5 client fixes Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Documentation Improvements or additions to documentation backport backport 9.0 backport 9.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants