From 50c588e1a51517585809985aef3b02ba0be088e9 Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Tue, 7 Nov 2023 00:18:27 +0800 Subject: [PATCH] docs(client): add example links (#3385) --- src/client/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index 4282b53c9c..86e3897388 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -2,10 +2,14 @@ //! //! hyper provides HTTP over a single connection. See the [`conn`] module. //! -//! ## Example +//! ## Examples //! -//! For a small example program simply fetching a URL, take a look at the -//! [full client example](https://github.com/hyperium/hyper/blob/master/examples/client.rs). +//! * [`client`] - A simple CLI http client that requests the url passed in parameters and outputs the response content and details to the stdout, reading content chunk-by-chunk. +//! +//! * [`client_json`] - A simple program that GETs some json, reads the body asynchronously, parses it with serde and outputs the result. +//! +//! [`client`]: https://github.com/hyperium/hyper/blob/master/examples/client.rs +//! [`client_json`]: https://github.com/hyperium/hyper/blob/master/examples/client_json.rs #[cfg(test)] mod tests;