change Builders to only error at the end

Closes #189
This commit is contained in:
Sean McArthur
2017-08-31 11:45:24 -07:00
parent a02b388b2b
commit 779f8080ef
16 changed files with 390 additions and 313 deletions

View File

@@ -63,8 +63,8 @@ impl Response {
/// use reqwest::Client;
/// use reqwest::StatusCode;
/// # fn run() -> Result<(), Box<::std::error::Error>> {
/// let client = Client::new()?;
/// let resp = client.post("http://httpbin.org/post")?
/// let client = Client::new();
/// let resp = client.post("http://httpbin.org/post")
/// .body("possibly too large")
/// .send()?;
/// match resp.status() {
@@ -94,8 +94,8 @@ impl Response {
/// # use reqwest::header::ContentLength;
/// #
/// # fn run() -> Result<(), Box<::std::error::Error>> {
/// let client = Client::new()?;
/// let mut resp = client.head("http://httpbin.org/bytes/3000")?.send()?;
/// let client = Client::new();
/// let mut resp = client.head("http://httpbin.org/bytes/3000").send()?;
/// if resp.status().is_success() {
/// let len = resp.headers().get::<ContentLength>()
/// .map(|ct_len| **ct_len)