lazyhttp 0.1.0

A simple HTTP library to handle common stream objects (TcpStream, TlsStream, etc) sending HTTP data. This library is very simple and is intended to make reading raw HTTP less repeitive, and as such it does not handle responding or networking.
Documentation
  • Coverage
  • 0%
    0 out of 7 items documented0 out of 2 items with examples
  • Size
  • Source code size: 3.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 264.88 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JohnSwiftC/lazyhttp
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JohnSwiftC

lazyhttp

An easy library to handle stream objects (TcpStream, TlsStream, etc) transferring HTTP data. Includes a function to parse and return an object representing the request.

This library does not handle networking or responding. This is really intended to remove a snippet of code that I find myself copying and pasting over and over again.

Example

let listener = TcpListener::bind("addr");

for stream in listener.incoming() {
    if let Ok(req) = lazyhttp::handle_stream(&stream) {
        // Do something with req
    }
}