Arnaud de Bossoreille d62f8c2bbd Body: don't call poll_ready on tx when 0 bytes remaining. (#479)
Some web servers (if IIS is a web server) may close their request
stream early when they consider the input is complete. That leads to
poll_ready returning an error of kind "Closed" which is legitimate as
the receiver disappeared. So this change ignores the case when the body
has been fully transmitted.
2019-03-26 13:09:08 -07:00
2019-02-13 11:46:12 -08:00
2017-10-22 13:27:20 +08:00
2019-02-13 11:46:12 -08:00
2019-03-20 14:18:39 -07:00
2019-03-20 14:18:39 -07:00
2016-06-30 17:23:51 -07:00
2016-12-13 15:47:28 -08:00
2019-01-15 21:23:41 -08:00

reqwest

Travis CI Status Appveyor CI Status crates.io Documentation

An ergonomic, batteries-included HTTP Client for Rust.

  • Plain bodies, JSON, urlencoded, multipart
  • Customizable redirect policy
  • HTTP Proxies
  • HTTPS via system-native TLS (or optionally, rustls)
  • Changelog

Example

extern crate reqwest;

use std::collections::HashMap;

fn main() -> Result<(), Box<std::error::Error>> {
    let resp: HashMap<String, String> = reqwest::get("https://httpbin.org/ip")?
        .json()?;
    println!("{:#?}", resp);
    Ok(())
}

Requirements

On Linux:

On Windows and macOS:

  • Nothing.

Reqwest uses rust-native-tls, which will use the operating system TLS framework if available, meaning Windows and macOS. On Linux, it will use OpenSSL 1.1.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Description
No description provided
Readme 2 MiB
Languages
Rust 99.6%
Nix 0.4%