Skip to content

Commit

Permalink
Fix documentation examples: missing json format, default client use…
Browse files Browse the repository at this point in the history
…s SSL (#222)

* Correct documentation to match `http::transport::DEFAULT_ADDRESS`

* add missing `json` format to cat index query
  • Loading branch information
eldad authored Aug 21, 2024
1 parent 89bedee commit 25a89d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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"]);
}
----
----
2 changes: 1 addition & 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

0 comments on commit 25a89d1

Please sign in to comment.