#http #http-client

nightly yukikaze

Beautiful and elegant HTTP library

31 releases (8 breaking)

✓ Uses Rust 2018 edition

new 1.0.0-alpha.2 May 16, 2019
0.8.0 Apr 18, 2019
0.5.4 Mar 24, 2019
0.3.1 Nov 23, 2018

#21 in HTTP client

Download history 57/week @ 2019-01-31 108/week @ 2019-02-07 104/week @ 2019-02-14 156/week @ 2019-02-21 191/week @ 2019-02-28 162/week @ 2019-03-07 158/week @ 2019-03-14 273/week @ 2019-03-21 126/week @ 2019-03-28 147/week @ 2019-04-04 235/week @ 2019-04-11 162/week @ 2019-04-18 130/week @ 2019-04-25 163/week @ 2019-05-02 86/week @ 2019-05-09

685 downloads per month
Used in 3 crates (2 directly)

Apache-2.0

117KB
2K SLoC

雪風(Yukikaze)

Build Crates.io Documentation dependency status

Yukikaze image

Beautiful and elegant Yukikaze is little HTTP client library based on hyper.

Features

  • Uses rustls for TLS
  • Support of various types of bodies: Plain text, JSON, multipart and forms
  • Simple redirect policy with option to limit number of redirections.
  • Support for text encodings aside from UTF-8.
  • Various helpers to extract useful headers: Cookies, ETag/Last-Modified, Content related headers.
  • File redirection support for response's body.
  • Notify interface to indicate progress of body's download.

Available cargo features

  • client - Enables client module. By default on.
  • rustls - Enables use of rustls for default SSL implementation. By default on
  • flate2-c - Enables decompression using flate2 crate with C backend. Default on.
  • flate2-rust - Enables decompression using flate2 crate with Rust backend. Default off.
  • encoding - Enables encoding crate support. Default off.
  • websocket - Enables Websocket Upgrade mechanism. Default off. Enables carry_extensions when on.
  • carry_extensions - Carries http::Extensions from request to resolved Response. Default off.

Examples

  • fie - CLI shit posting tool for various social medias.

Q&A

Q: Why not just use reqwest/actix-web/mio_httpc?

A: Reqwest API sucks, actix-web client comes with lots of server code and mio_httpc is unknown beast to me(I just found out about it when created Yukikaze).


Q: I see some moon runes and anime picture. Are you one of these disgusting weebs?

A: Obviously yes ;)


Q: Why so many inlines? Are you this stupid to use pre-mature optimizations!?

A: Yes, I'm stupid enough because compiler doesn't want inline methods across crates by default(unless you turn on LTO)


Q: Why builder methods panic? Why don't you store error in builder and return it when finishing creating request?

A: I believe in normal cases you are not supposed to create invalid requests so I consider such errors as quite exceptional


Dependencies

~15MB
~411K SLoC