docs(client): use Method::POST to match the example in https://hyper.rs/guides/client/advanced/ (#2479)
This commit is contained in:
committed by
GitHub
parent
41f99578a5
commit
51ed71b0a6
@@ -141,12 +141,12 @@ where
|
|||||||
/// ```
|
/// ```
|
||||||
/// # #[cfg(feature = "runtime")]
|
/// # #[cfg(feature = "runtime")]
|
||||||
/// # fn run () {
|
/// # fn run () {
|
||||||
/// use hyper::{Body, Client, Request};
|
/// use hyper::{Body, Method, Client, Request};
|
||||||
///
|
///
|
||||||
/// let client = Client::new();
|
/// let client = Client::new();
|
||||||
///
|
///
|
||||||
/// let req = Request::builder()
|
/// let req = Request::builder()
|
||||||
/// .method("POST")
|
/// .method(Method::POST)
|
||||||
/// .uri("http://httpbin.org/post")
|
/// .uri("http://httpbin.org/post")
|
||||||
/// .body(Body::from("Hallo!"))
|
/// .body(Body::from("Hallo!"))
|
||||||
/// .expect("request builder");
|
/// .expect("request builder");
|
||||||
|
|||||||
Reference in New Issue
Block a user