little-hyper 0.1.0

Hyper text transfar protocol written in rust.
Documentation
  • Coverage
  • 48.05%
    37 out of 77 items documented0 out of 40 items with examples
  • Size
  • Source code size: 22.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.63 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • mdmahikaishar/little-hyper
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mdmahikaishar

Little Hyper

Rust

Hyper text transfar protocol written in rust.

Example

use little_hyper::{LittleServer, Router};

fn main() {
    let mut router = Router::new();

    router.get("/", |_req, res| {
        res.html("<h1>Hello world kahin hoilm.</h1>");
    });

    router.get("/hello", |_req, res| res.json("hello"));

    router.get("/users/:userId", |req, res| {
        res.json(&format!("userId --> {:?}, {:?}", req.params, req.query));
    });

    let mut server = LittleServer::new(true);

    server.add_router(router);

    println!("Listening on http://127.0.0.1:3000");

    server.listen("127.0.0.1:3000").unwrap();
}

Contributing

Contributions are welcome! I would like you to contribute in this project.

Roadmap

This project is in its early stages, and there are many missing features that need implementation. Check the Issues section for a list of features, enhancements, and bug fixes that are planned.

License

This project is licensed under the MIT License - see the LICENSE file for details.