#https #http #rest #web #api

slimweb

Slim HTTP 1.1 client/server library

5 unstable releases

0.3.0 Mar 28, 2020
0.2.0 Mar 17, 2020
0.1.2 Mar 17, 2020
0.1.1 Mar 17, 2020
0.1.0 Mar 14, 2020

#1374 in HTTP server

MIT license

70KB
2K SLoC

slimweb

Slim HTTP 1.1 client/server library.

I felt compelled (or inspired if you will) to write this library after reading this article: https://medium.com/@shnatsel/smoke-testing-rust-http-clients-b8f2ee5db4e6

More on the controversial side of the Rust community, it seemed quite interesting how such eloquent libraries could be riddled down to such minor details that could cause major problems. So, I'm throwing another into the mix that will probably hit that same point.

  • Rust 2018
  • No async functionality.
  • Decisively using deadlines for DoS prevention (didn't want to deal with leaky thread racing).
  • Using Rustls for SSL/TLS encryption.
  • Using flate2 for compression/decompression (GZip only).

Installation

[dependencies]
slimweb = "0.1"

Features

  • Client (default)

  • Server

  • tls (security)

  • json

  • compress (both compression and decompression)

  • punycode (for client only)

  • multipart (multipart/form-data)

ITW

  • Server deadlines
  • 100-Continue
  • Multipart/form-data
  • Strict adherence to deadlines
  • Better tests

Dependencies

~0.3–3.5MB
~75K SLoC