Designed for [HAWK](https://github.com/euvoor/hawk) Example ======= ```rust use tokio::net::TcpListener; use http_rs::Http; use websocket_rs::{ Websocket, Opcode }; #[tokio::main] async fn main() -> Result<(), Box> { let mut listener = TcpListener::bind("127.0.0.1:8080").await?; println!("Listening for websocket connections on 127.0.0.1:8080"); while let Ok((stream, addr)) = listener.accept().await { tokio::spawn(async move { println!("New connection from {:?}", addr); let mut http = Http::new(stream); if let Some(req) = http.next().await { println!("{:?}", req); } }); } Ok(()) } ``` TODO ==== - [*] Handle errors properly - [x] Support GET/POST request - [x] Parse Request-Line & headers - [ ] Read POST body - [ ] Generate a suitable response - [ ] Handles Compression - [ ] Serve static files from disk