Skip to content
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

Fix documentation examples: missing json format, default client uses SSL #222

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Build a transport to make API requests to Elasticsearch using the `TransportBuil
which allows setting of proxies, authentication schemes, certificate validation, and
other transport related settings.

To create a client to make API calls to Elasticsearch running on `http://localhost:9200`
To create a client to make API calls to Elasticsearch running on `https://localhost:9200`

```rust,no_run
use elasticsearch::Elasticsearch;
Expand Down
4 changes: 2 additions & 2 deletions docs/overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Elasticsearch Rust client is forward compatible; meaning that the client sup
[discrete]
=== Create a client

To create a client to make API calls to Elasticsearch running on `\http://localhost:9200`
To create a client to make API calls to Elasticsearch running on `\https://localhost:9200`

[source,rust]
----
Expand Down Expand Up @@ -87,4 +87,4 @@ for hit in response_body["hits"]["hits"].as_array().unwrap() {
// print the source document
println!("{:?}", hit["_source"]);
}
----
----
3 changes: 2 additions & 1 deletion elasticsearch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
//!
//! ## Create a client
//!
//! To create a client to make API calls to Elasticsearch running on `http://localhost:9200`
//! To create a client to make API calls to Elasticsearch running on `https://localhost:9200`
//!
//! ```rust,no_run
//! # use elasticsearch::Elasticsearch;
Expand Down Expand Up @@ -188,6 +188,7 @@
//! let response = client
//! .cat()
//! .indices(CatIndicesParts::Index(&["*"]))
//! .format("json")
//! .send()
//! .await?;
//!
Expand Down