An HTTP library for Rust

Overview

hyper

crates.io Released API docs MIT licensed CI Discord chat

A fast and correct HTTP implementation for Rust.

  • HTTP/1 and HTTP/2
  • Asynchronous design
  • Leading in performance
  • Tested and correct
  • Extensive production use
  • Client and Server APIs

Get started by looking over the guides.

"Low-level"

hyper is a relatively low-level library, meant to be a building block for libraries and applications.

If you are looking for a convenient HTTP client, then you may wish to consider reqwest. If you are looking for a convenient HTTP server, then you may wish to consider warp. Both are built on top of this library.

Contributing

To get involved, take a look at CONTRIBUTING.

If you prefer chatting, there is an active community in the Discord server.

License

hyper is provided under the MIT license. See LICENSE.

You might also like...
 HTTPie: human-friendly CLI HTTP client for the API era
HTTPie: human-friendly CLI HTTP client for the API era

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

xh is a friendly and fast tool for sending HTTP requests. It reimplements as much as possible of HTTPie's excellent design, with a focus on improved performance.
xh is a friendly and fast tool for sending HTTP requests. It reimplements as much as possible of HTTPie's excellent design, with a focus on improved performance.

xh is a friendly and fast tool for sending HTTP requests. It reimplements as much as possible of HTTPie's excellent design, with a focus on improved performance

rh: user-friendly command-line HTTP client

Rust HTTP Cli The command name in your terminal is rh. rh: user-friendly command-line HTTP client rh is a user-friendly, lightweight and performant co

A GraphQL server library implemented in Rust

A GraphQL server library implemented in Rust Async-graphql is a high-performance server-side library that supports all GraphQL specifications. Feature

Rust bindings to libcurl

curl-rust libcurl bindings for Rust Quick Start use std::io::{stdout, Write}; use curl::easy::Easy; // Print a web page onto stdout fn main() {

Typed, correct GraphQL requests and responses in Rust

graphql_client A typed GraphQL client library for Rust. Features Precise types for query variables and responses. Supports GraphQL fragments, objects,

A rule34 scraper made in rust this time

rust-34-scraper A rule34 scraper made in rust this time Building Clone the repository Execute cargo build --release --release is an optimized build pr

An experimental HTTP server in Rust that supports HTTP/1.1, HTTP/2, and HTTP/3 over QUIC.

๐Ÿš€ H123 An experimental HTTP server in Rust that supports HTTP/1.1, HTTP/2, and HTTP/3 over QUIC. Warning This is an experimental project and not inte

A more modern http framework benchmarker supporting HTTP/1 and HTTP/2 benchmarks.

rewrk A more modern http framework benchmark utility.

A MITM Proxy Written in Rust ๐Ÿฆ€! Toolkit for HTTP/1, HTTP/2, and WebSockets with SSL/TLS Capabilities. Learning Project.
A MITM Proxy Written in Rust ๐Ÿฆ€! Toolkit for HTTP/1, HTTP/2, and WebSockets with SSL/TLS Capabilities. Learning Project.

Man In The Middle Proxy Description Rust-based Man in the Middle proxy, an early-stage project aimed at providing visibility into network traffic. Cur

HTTP mocking library for Rust.

httpmock HTTP mocking library for Rust. Documentation ยท Crate ยท Report Bug ยท Request Feature ยท Changelog Features Simple, expressive, fluent API. Many

A HTTP Archive format (HAR) serialization & deserialization library, written in Rust.

har-rs HTTP Archive format (HAR) serialization & deserialization library, written in Rust. Install Add the following to your Cargo.toml file: [depende

An HTTP library for Rust

hyper A fast and correct HTTP implementation for Rust. HTTP/1 and HTTP/2 Asynchronous design Leading in performance Tested and correct Extensive produ

An HTTP library for Rust

hyper A fast and correct HTTP implementation for Rust. HTTP/1 and HTTP/2 Asynchronous design Leading in performance Tested and correct Extensive produ

Low level HTTP server library in Rust

tiny-http Documentation Tiny but strong HTTP server in Rust. Its main objectives are to be 100% compliant with the HTTP standard and to provide an eas

Rust library for HTTP authentication. Parses challenge lists, responds to Basic and Digest challenges. Likely to be extended with server support and additional auth schemes.

Rust library for HTTP authentication. Parses challenge lists, responds to Basic and Digest challenges. Likely to be extended with server support and a

Completely OBSOLETE Rust HTTP library (server and client)

OBSOLETION NOTICE This library is DEAD. It was a useful experiment and is now being replaced under the scope of the Teepee (experimentation grounds at

Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

A structure-aware HTTP fuzzing library
A structure-aware HTTP fuzzing library

๐Ÿš€ FeroxFuzz ๐Ÿš€ A structure-aware HTTP fuzzing library ๐Ÿค” Another ferox? why? ๐Ÿค” Chill, it's not another command-line tool, this one's a library! ๐Ÿ˜ M

Comments
  • feat(server): backport the split server conn modules

    feat(server): backport the split server conn modules

    This PR backports the server::conn::http1 and server::conn::http2 modules to 0.14.x. I've drew a lot on the work already done in https://github.com/hyperium/hyper/pull/3063 (:pray:), but diverged a bit on the feature naming (no strong feelings on this though). I also implemented the deprecated feature flag as was suggested in that PR.

    I have a couple of questions:

    • I cut out the common::time::Timer (as is done in split client conn backports), is that OK or should that module also be backported?
    • How many tests should be backported? I've started with only one for each protocol, but I'm happy to add more.

    I've also only added one deprecation warning so far, but I'll look around and see if more make sense.

    Closes #3079

    opened by oddgrd 2
  • Website: Add top-level Contrib section

    Website: Add top-level Contrib section

    • Add to the top level navigation: "contrib", linking to /contrib.
    • Have the files from hyper's repo docs folder rendered (lowercase the names, so there should be /contrib/pull-requests/)
    • Make them sync nightly with the repo (don't copy the source manually).
    A-docs E-medium 
    opened by seanmonstar 0
  • update existing guides to hyper 1.0

    update existing guides to hyper 1.0

    Guides are seen at https://hyper.rs/guides/1/ (compare to previous guides https://hyper.rs/guides/0.14/)

    • [x] server hello world
    • [x] server echo
    • [ ] server graceful shutdown
    • [ ] client getting started
    • [ ] client advanced
    A-client E-easy A-docs 
    opened by seanmonstar 0
  • Nameable Future-Proof hyper Executors

    Nameable Future-Proof hyper Executors

    Goal

    Make the Executor bounds on client and server types publicly nameable, while still preserving the ability to change internal spawning needs.

    Background

    hyper's client and server types require a hyper::rt::Executor to spawn some related background tasks.

    There's two conflicting requirements for the executor:

    • The internal types that are spawned must be provided to the Executor (via Executor<InternalFuture>), so that the Sendiness can be propagated. This allows users to have !Send futures and bodies as long as they provide an Executor that can spawn them.
    • The internal types expose some of the private architecture, so being able to name them makes it impossible to refactor in the future. Being able to exhaustively name them would prevent us from spawning new background tasks as features are developed.

    So far, we have solved this by using privately-public traits, which are blanketly implemented for all generic executors. This allows us to change the types internally, and as long as a user provides a type that is impl<F: Future> Executor<F> for MyExec, it just works.

    But it has some annoying problems.

    • It's not possible to build functions or types on top, since in another crate, you can't write E: Executor<CantNameMe>, nor E: hyper::unnameable::ConnStreamExec (see #2051; https://github.com/hyperium/hyper-util/pull/11#discussion_r1044221053).
    • The bounds are confusing in the documentation (for example).

    Proposal

    Define public trait aliases that are sealed, but can be named externally, and have documentation showing how to provide a Executor to match the bounds, and how to express the bounds in your own API.

    For example: define hyper::rt::bounds::ServerConnHttp2Exec, which is a public trait.

    This allows us to continue to not expose the actual internal types, and also to extend the trait to be represent spawning other tasks if need be.

    S-feature E-medium A-rt 
    opened by seanmonstar 0
Releases(v1.0.0-rc.2)
  • v1.0.0-rc.2(Dec 29, 2022)

    Bug Fixes

    • client: send an error back to client when dispatch misbehaves () (75aac9f4, closes #2649)
    • http2: Fix race condition in client dispatcher (#3041) (f202230c)

    Features

    • body: upgrade to http-body 1.0.0-rc.2 (#3106) (51b45e3f)
    • client:
      • remove http2_ prefixes from client::conn::http2::Builder methods (669df217)
      • remove http1_ prefixes from client::conn::http1::Builder methods (4cbaef79)
      • implement Clone for http2::SendRequest (#3042) (00ea49e4, closes #3036)
      • allow ignoring HTTP/1 invalid header lines in requests (81e25fa8)
    • rt: Clean up Timer trait (#3037) (8790fee7, closes #3028)
    • server:
      • remove http1_ method prefixes from server::conn::http2::Builder (291ed0b4)
      • remove http1_ method prefixes from server::conn::http2::Builder (48e70c69)
      • remove server::conn::http2::Builder::with_executor() (#3089) (ab59a6f7, closes #3087)

    Breaking Changes

    • removes server::conn::http2::Builder::with_executor() (ab59a6f7)
    • The return types of Timer have been changed. (8790fee7)
    • The return types for Frame::into_data() and Frame::into_trailers() have been changed from Option<T> to Result<T, Self>.
    • Most methods on the various Builders have have their names changed, removing the version prefix (e.g. http1_writev() becomes writev()).

    New Contributors

    • @programatik29 made their first contribution in https://github.com/hyperium/hyper/pull/3059
    • @alexs-sh made their first contribution in https://github.com/hyperium/hyper/pull/3072
    • @MrGunflame made their first contribution in https://github.com/hyperium/hyper/pull/3089
    • @dzvon made their first contribution in https://github.com/hyperium/hyper/pull/3090
    • @oliviacrain made their first contribution in https://github.com/hyperium/hyper/pull/3091
    Source code(tar.gz)
    Source code(zip)
  • v0.14.23(Nov 7, 2022)

    Bug Fixes

    • http2: Fix race condition in client dispatcher (#3041) (2f1c0b72, closes #2419)
    • dependencies: Really fix compile-time feature for socket2 dependency.

    New Contributors

    • @jfourie1 made their first contribution in https://github.com/hyperium/hyper/pull/3041
    Source code(tar.gz)
    Source code(zip)
  • v0.14.22(Oct 31, 2022)

  • v0.14.21(Oct 31, 2022)

    Bug Fixes

    • client: send an error back to client when dispatch misbehaves () (9fa36382, closes #2649)
    • http1: fix http1_header_read_timeout to use same future (#2891) (c5a14e7c)

    Features

    • http1: allow ignoring invalid header lines in requests (73dd4746)
    • server: add Server::tcp_keepalive_interval and Server::tcp_keepalive_retries (#2991) (287d7124)

    New Contributors

    • @hansonchar made their first contribution in https://github.com/hyperium/hyper/pull/2991
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.1(Oct 26, 2022)

    Bug Fixes

    • http1:
      • trim obs-folded headers when unfolding (#2926) (d4b5bd4e)

    Features

    • body:
      • rename Body struct to Incoming (#3022) (95a153bb, closes #2971)
      • update HttpBody trait to use Frames (#3020) (0888623d, closes #3010)
      • make body::Sender and Body::channel private (#2970) (d963e6a9, closes #2962)
      • remove "full" constructors from Body (#2958) (9e8fc8fc)
    • client:
      • remove client::conn::{SendRequest, Connection} (#2987) (8ae73cac)
      • remove client::connect module (#2949) (5e206883)
      • remove higher-level hyper::Client (#2941) (bb3af17c)
      • remove hyper::client::server (#2940) (889fa2d8)
      • introduce version-specific client modules (#2906) (509672aa)
    • ffi: add http1_allow_multiline_headers (#2918) (09e35668)
    • lib: remove stream cargo feature (#2896) (ce72f734, closes #2855)
    • rt: add Timer trait (#2974) (fae97ced)
    • server:
      • remove server::conn::{Http, Connection} types (#3013) (0766d3f7, closes #3012)
      • server::conn::http1 and server::conn::http2 modules (#3011) (fc4d3356, closes #2851)
      • remove the high-level Server API (#2932) (3c7bef3b)
      • remove AddrStream struct (#2869) (e9cab49e, closes #2850)
    • service: create own Service trait (#2920) (fee7d361, closes #2853)

    Breaking Changes

    • The polling functions of the Body trait have been redesigned.

      The free functions hyper::body::to_bytes and aggregate have been removed. Similar functionality is on http_body_util::BodyExt::collect. (0888623d)

    • Either choose a version-specific Connection type, or look for the auto-version type in hyper-util. (0766d3f7)

    • Pick a version-specific connection, or use the combined one in hyper-util. (8ae73cac)

    • Change any manual impl tower::Service to implement hyper::service::Service instead. The poll_ready method has been removed. (fee7d361)

    • The trait has been renamed. (031454e5)

    • A channel body will be available in hyper-util. (d963e6a9)

    • Use the types from http-body-util. (9e8fc8fc)

    • Use connect from hyper-util. (5e206883)

    • A pooling client is in the hyper-util crate. (bb3af17c)

    • Tower Service utilities will exist in hyper-util. (889fa2d8)

    New Contributors

    • @kianmeng made their first contribution in https://github.com/hyperium/hyper/pull/2876
    • @Ticsmtc made their first contribution in https://github.com/hyperium/hyper/pull/2889
    • @oddgrd made their first contribution in https://github.com/hyperium/hyper/pull/2869
    • @deantvv made their first contribution in https://github.com/hyperium/hyper/pull/2918
    • @andrewhickman made their first contribution in https://github.com/hyperium/hyper/pull/2953
    • @Michael-J-Ward made their first contribution in https://github.com/hyperium/hyper/pull/2966
    • @RajivTS made their first contribution in https://github.com/hyperium/hyper/pull/2969
    • @tomkarw made their first contribution in https://github.com/hyperium/hyper/pull/2920
    • @sashashura made their first contribution in https://github.com/hyperium/hyper/pull/2985
    • @mkusaka made their first contribution in https://github.com/hyperium/hyper/pull/2986
    • @dannasman made their first contribution in https://github.com/hyperium/hyper/pull/3002
    • @bossmc made their first contribution in https://github.com/hyperium/hyper/pull/3018
    Source code(tar.gz)
    Source code(zip)
  • v0.14.20(Jul 7, 2022)

    Bug Fixes

    • http1: fix http1_header_read_timeout to use same future (#2891) (c5a14e7c)

    Features

    • ext: support non-canonical HTTP/1 reason phrases (#2792) (b2052a43)

    New Contributors

    • @kianmeng made their first contribution in https://github.com/hyperium/hyper/pull/2876
    • @Ticsmtc made their first contribution in https://github.com/hyperium/hyper/pull/2889
    Source code(tar.gz)
    Source code(zip)
  • v0.14.19(May 27, 2022)

    Bug Fixes

    • http1: fix preserving header case without enabling ffi (#2820) (6a35c175)
    • server: don't add implicit content-length to HEAD responses (#2836) (67b73138)

    Features

    • server:
      • add Connection::http2_max_header_list_size option (#2828) (a32658c1, closes #2826)
      • add AddrStream::local_addr() (#2816) (ffbf610b, closes #2773)

    Breaking Changes

    • ffi (unstable):
      • hyper_clientconn_options_new no longer sets the http1_preserve_header_case connection option by default. Users should now call hyper_clientconn_options_set_preserve_header_case if they desire that functionality. (78de8914)

    New Contributors โค๏ธ

    • @SabrinaJewson made their first contribution in https://github.com/hyperium/hyper/pull/2775
    • @Some-Dood made their first contribution in https://github.com/hyperium/hyper/pull/2812
    • @liamwarfield made their first contribution in https://github.com/hyperium/hyper/pull/2798
    • @cuishuang made their first contribution in https://github.com/hyperium/hyper/pull/2818
    • @jannes made their first contribution in https://github.com/hyperium/hyper/pull/2836
    • @silence-coding made their first contribution in https://github.com/hyperium/hyper/pull/2828
    • @nylonicious made their first contribution in https://github.com/hyperium/hyper/pull/2762
    • @ryanrussell made their first contribution in https://github.com/hyperium/hyper/pull/2875
    Source code(tar.gz)
    Source code(zip)
  • v0.14.18(Mar 22, 2022)

    Bug Fixes

    • ffi: don't build C libraries by default (1c663706)

    Features

    • client: add HttpInfo::local_addr() method (055b4e7e, closes #2767)

    New Contributors

    • @ilyatrefilov made their first contribution in https://github.com/hyperium/hyper/pull/2760
    • @stephank made their first contribution in https://github.com/hyperium/hyper/pull/2765
    • @kubuzetto made their first contribution in https://github.com/hyperium/hyper/pull/2768
    • @lqd made their first contribution in https://github.com/hyperium/hyper/pull/2770
    Source code(tar.gz)
    Source code(zip)
  • v0.14.17(Feb 10, 2022)

    Bug Fixes

    • client: avoid panics in uses of Instant on buggy OSes (#2746) (dcdd6d10)

    Features

    • client: implement the HTTP/2 extended CONNECT protocol from RFC 8441 (#2682) (5ec094ca)
    • error: add Error::message (#2737) (6932896a, closes #2732)
    • http1: implement obsolete line folding (#2734) (1f0c177b)

    New Contributors

    • @waywardmonkeys made their first contribution in https://github.com/hyperium/hyper/pull/2721
    • @monoid made their first contribution in https://github.com/hyperium/hyper/pull/2727
    • @olix0r made their first contribution in https://github.com/hyperium/hyper/pull/2746
    Source code(tar.gz)
    Source code(zip)
  • v0.14.16(Dec 9, 2021)

    Features

    • http2: add http2_max_send_buf_size option to client and server (bff977b7)
    • server: add HTTP/1 header read timeout option (#2675) (842c6553, closes #2457)

    Bug Fixes

    • http1: return 414 when URI contains more than 65534 characters (#2706) (5f938fff, closes #2701)
    • http2: received Body::size_hint() now return 0 if implicitly empty (#2715) (84b78b6c)
    • server: use case-insensitive comparison for Expect: 100-continue (#2709) (7435cc33, closes #2708)

    New Contributors

    • @rajing made their first contribution in https://github.com/hyperium/hyper/pull/2706
    • @JonathanMurray made their first contribution in https://github.com/hyperium/hyper/pull/2709
    Source code(tar.gz)
    Source code(zip)
  • v0.14.15(Nov 16, 2021)

    Bug Fixes

    • client: cancel blocking DNS lookup if GaiFuture is dropped (174b553d)

    Features

    • http1: add http1_writev(bool) options to Client and Server builders, to allow forcing vectored writes (80627141)
    • upgrade: allow http upgrades with any body type (ab469eb3)

    New Contributors

    • @luqmana made their first contribution in https://github.com/hyperium/hyper/pull/2680
    • @whentze made their first contribution in https://github.com/hyperium/hyper/pull/2688
    • @ahmedsobeh made their first contribution in https://github.com/hyperium/hyper/pull/2689
    Source code(tar.gz)
    Source code(zip)
  • v0.14.14(Oct 22, 2021)

  • v0.14.13(Sep 16, 2021)

    Bug Fixes

    • client: don't reuse a connection while still flushing (c88011da)
    • server: convert panic to error if Connection::without_shutdown called on HTTP/2 conn (ea3e2282)

    Features

    • ffi: add hyper_request_set_uri_parts (a54689b9)
    • lib:
      • Export more things with Cargo features (server, !http1, !http2) (0a4b56ac)
      • Export rt module independently of Cargo features (cf6f62c7)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.12(Aug 24, 2021)

    Bug Fixes

    • ffi: on_informational callback had no headers (39b6d01a)
    • http1: apply header title case for consecutive dashes (#2613) (684f2fa7)
    • http2: improve errors emitted by HTTP2 Upgraded stream shutdown (#2622) (be08648e)

    Features

    • client: expose http09 and http1 options on client::conn::Builder (#2611) (73bff4e9, closes #2461)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.11(Jul 21, 2021)

    Bug Fixes

    • client: retry when pool checkout returns closed HTTP2 connection (#2585) (52214f39)
    • http2:
      • improve I/O errors emitted by H2Upgraded (#2598) (f51c677d)
      • preserve proxy-authenticate and proxy-authorization headers (#2597) (52435701)

    Features

    • ffi: add hyper_request_on_informational (25d18c0b)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.10(Jul 7, 2021)

    Bug Fixes

    • http1:
      • reject content-lengths that have a plus sign prefix (06335158) (Security GHSA-f3pg-qwvg-p99c)
      • protect against overflow in chunked decoder (efd9a982) (Security GHSA-5h46-h7hh-c6x9)

    Features

    • ffi: add option to get raw headers from response (8c89a8c1)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.9(Jun 7, 2021)

  • v0.14.8(May 25, 2021)

    Features

    • client: allow to config http2 max concurrent reset streams (#2535) (b9916c41)
    • error: add Error::is_parse_too_large and Error::is_parse_status methods (#2538) (960a69a5)
    • http2:
      • Implement Client-side CONNECT support over HTTP/2 (#2523) (5442b6fa, closes #2508)
      • allow HTTP/2 requests by ALPN when http2_only is unset (#2527) (be9677a1)

    Performance

    • http2: reduce amount of adaptive window pings as BDP stabilizes (#2550) (4cd06bf2)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.6(Apr 21, 2021)

  • v0.14.5(Mar 26, 2021)

    Bug Fixes

    • client: omit default port from automatic Host headers (#2441) (0b11eee9)
    • headers: Support multiple Content-Length values on same line (#2471) (48fdaf16, closes #2470)
    • server: skip automatic Content-Length headers when not allowed (#2216) (8cbf9527, closes #2215)

    Features

    • client: allow HTTP/0.9 responses behind a flag (#2473) (68d4e4a3, closes #2468)
    • server: add AddrIncoming::from_listener constructor (#2439) (4c946af4)
    Source code(tar.gz)
    Source code(zip)
  • v0.14.4(Feb 5, 2021)

  • v0.14.3(Feb 5, 2021)

    Bug Fixes

    • client: HTTP/1 client "Transfer-Encoding" repair code would panic (#2410) (2c8121f1, closes #2409)

    • http1: fix server misinterpretting multiple Transfer-Encoding headers (8f93123e)

      See https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf

    Features

    • body:
      • reexport hyper::body::SizeHint (#2404) (9956587f)
      • add send_trailers to Body channel's Sender (#2387) (bf8d74ad, closes #2260)
    • ffi:
      • add HYPERE_INVALID_PEER_MESSAGE error code for parse errors (1928682b)
      • Initial unstable C API for hyper (3ae1581a)
    Source code(tar.gz)
    Source code(zip)
  • v0.13.10(Feb 5, 2021)

  • v0.14.2(Dec 29, 2020)

  • v0.14.1(Dec 24, 2020)

  • v0.14.0(Dec 23, 2020)

    Blog post: https://seanmonstar.com/post/638320652536922112/hyper-v014

    Bug Fixes

    • client: log socket option errors instead of returning error (#2361) (dad5c879, closes #2359)
    • http1:
      • ignore chunked trailers (#2357) (1dd761c8, closes #2171)
      • ending close-delimited body should close (#2322) (71f34024)

    Features

    • client:
      • change DNS Resolver to resolve to SocketAddrs (#2346) (b4e24332, closes #1937)
      • Make client an optional feature (4e55583d)
    • http1: Make HTTP/1 support an optional feature (2a19ab74)
    • http2: Make HTTP/2 support an optional feature (b819b428)
    • lib:
      • Upgrade to Tokio 1.0, Bytes 1.0, http-body 0.4 (#2369) (fad42acc, closes #2370)
      • remove dependency on tracing's log feature (#2342) (db32e105, closes #2326)
      • disable all optional features by default (#2336) (ed2b22a7)
    • server: Make the server code an optional feature (#2334) (bdb5e5d6)
    • upgrade: Moved HTTP upgrades off Body to a new API (#2337) (121c3313, closes #2086)

    Breaking Changes

    • hyper depends on tokio v1 and bytes v1.

    • Custom resolvers used with HttpConnector must change to resolving to an iterator of SocketAddrs instead of IpAddrs. (b4e24332)

    • hyper no longer emits log records automatically. If you need hyper to integrate with a log logger (as opposed to tracing), you can add tracing = { version = "0.1", features = ["log"] } to activate them. (db32e105)

    • Removed http1_writev methods from client::Builder, client::conn::Builder, server::Builder, and server::conn::Builder.

      Vectored writes are now enabled based on whether the AsyncWrite implementation in use supports them, rather than though adaptive detection. To explicitly disable vectored writes, users may wrap the IO in a newtype that implements AsyncRead and AsyncWrite and returns false from its AsyncWrite::is_write_vectored method. (d6aadb83)

    • The method Body::on_upgrade() is gone. It is essentially replaced with hyper::upgrade::on(msg). (121c3313)

    • All optional features have been disabled by default. (ed2b22a7)

    • The HTTP server code is now an optional feature. To enable the server, add features = ["server"] to the dependency in your Cargo.toml. (bdb5e5d6)

    • The HTTP client of hyper is now an optional feature. To enable the client, add features = ["client"] to the dependency in your Cargo.toml. (4e55583d)

    • This puts all HTTP/1 methods and support behind an http1 cargo feature, which will not be enabled by default. To use HTTP/1, add features = ["http1"] to the hyper dependency in your Cargo.toml.

    (2a19ab74)

    • This puts all HTTP/2 methods and support behind an http2 cargo feature, which will not be enabled by default. To use HTTP/2, add features = ["http2"] to the hyper dependency in your Cargo.toml.

    (b819b428)

    Source code(tar.gz)
    Source code(zip)
  • v0.13.9(Nov 2, 2020)

    Bug Fixes

    • client: fix panic when addrs in ConnectingTcpRemote is empty (#2292) (01103da5, closes #2291)
    • http2: reschedule keep alive interval timer once a pong is received (2a938d96, closes #2310)

    Features

    • client:
      • add HttpConnector::set_local_addresses to set both IPv6 and IPv4 local addrs ( (fb19f3a8)
      • Add accessors to Connected fields (#2290) (2dc9768d)
    Source code(tar.gz)
    Source code(zip)
  • v0.13.8(Sep 18, 2020)

  • v0.13.7(Jul 14, 2020)

    Bug Fixes

    • client: don't panic in DNS resolution when task cancelled (#2229) (0d0d3635)

    Features

    • client: impl tower_service::Service for &Client (#2089) (77c3b5bc)
    • http2: configure HTTP/2 frame size in the high-level builders too (#2214) (2354a7ee)
    • lib: Move from log to tracing in a backwards-compatible way (#2204) (9832aef9)
    Source code(tar.gz)
    Source code(zip)
  • v0.13.6(May 29, 2020)

An easy and powerful Rust HTTP Client

reqwest An ergonomic, batteries-included HTTP Client for Rust. Plain bodies, JSON, urlencoded, multipart Customizable redirect policy HTTP Proxies HTT

Sean McArthur 6.8k Dec 31, 2022
FeignHttp is a declarative HTTP client. Based on rust macros.

FeignHttp is a declarative HTTP client. Based on rust macros. Features Easy to use Asynchronous request Configurable timeout settings Suppor

null 46 Nov 30, 2022
Pretend is a macros-based declarative Rust HTTP client

pretend is a modular, Feign-inspired HTTP, client based on macros. It's goal is to decouple the definition of a REST API from it's implementation.

null 24 Aug 3, 2022
Pyre - A fast python HTTP server inspired by japronto written in rust.

Pyre - A fast python HTTP server inspired by japronto written in rust.

null 135 Nov 26, 2022
Minimal Rust HTTP client for both native and WASM

ehttp: a minimal Rust HTTP client for both native and WASM If you want to do HTTP requests and are targetting both native and web (WASM), then this is

Emil Ernerfeldt 105 Dec 25, 2022
Fast and friendly HTTP server framework for async Rust

Tide Serve the web API Docs | Contributing | Chat Tide is a minimal and pragmatic Rust web application framework built for rapid development. It comes

http-rs 4.1k Jan 2, 2023
ratpack: a simpleton's HTTP framework (for rust-lang)

ratpack: a simpleton's HTTP framework (for rust-lang) ratpack is idealized in the simplicity of the sinatra (ruby) framework in its goal, and attempts

ZeroTier, Inc. 5 Jun 29, 2022
A backend providing a HTTP REST like interface for uploading files written in rust.

UploadServer A backend providing a HTTP REST like interface for uploading files written in rust. API Documentation License This project is licensed un

null 4 Nov 20, 2022
๐Ÿฑโ€๐Ÿ‘ค Drop-in HTTP replacement module for Garry's Mod

??โ€?? gmsv_reqwest This module is a drop-in replacement for Garry's Mod's HTTP function, inspired by gmsv_chttp created by timschumi. The module uses

William 38 Dec 12, 2022
Multi-stream HTTP downloader using range requests

chooch - An Amazing Project Downloads files faster than wget/curl (in theory) using multiple connections. Chooch recycles the slowest connection and r

null 13 Sep 14, 2022