From 28348f1e51d3d20d09f33b0c41035b1e29121bf8 Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Fri, 22 Jun 2018 10:57:29 +0200 Subject: [PATCH] shorter doc examples --- src/response.rs | 11 +++++++---- src/test/hello_world.json | 3 --- 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 src/test/hello_world.json diff --git a/src/response.rs b/src/response.rs index 47f1824..63830d7 100644 --- a/src/response.rs +++ b/src/response.rs @@ -233,7 +233,8 @@ impl Response { /// use std::io::Read; /// /// let resp = - /// ureq::get("https://raw.githubusercontent.com/algesten/ureq/master/.gitignore").call(); + /// ureq::get("https://s3.amazonaws.com/foosrvr/hello_world.json") + /// .call(); /// /// assert!(resp.has("Content-Length")); /// let len = resp.header("Content-Length") @@ -272,11 +273,12 @@ impl Response { /// /// ``` /// let resp = - /// ureq::get("https://raw.githubusercontent.com/algesten/ureq/master/.gitignore").call(); + /// ureq::get("https://s3.amazonaws.com/foosrvr/hello_world.json") + /// .call(); /// /// let text = resp.into_string().unwrap(); /// - /// assert!(text.contains("target")); + /// assert!(text.contains("hello")); /// ``` pub fn into_string(self) -> IoResult { let encoding = encoding_from_whatwg_label(self.charset()) @@ -293,7 +295,8 @@ impl Response { /// /// ``` /// let resp = - /// ureq::get("https://s3.amazonaws.com/foosrvr/hello_world.json").call(); + /// ureq::get("https://s3.amazonaws.com/foosrvr/hello_world.json") + /// .call(); /// /// let json = resp.into_json().unwrap(); /// diff --git a/src/test/hello_world.json b/src/test/hello_world.json deleted file mode 100644 index f2a886f..0000000 --- a/src/test/hello_world.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "hello": "world" -}