2 releases

0.1.6 Dec 31, 2024
0.1.5 Dec 16, 2024
0.1.3 Nov 28, 2024

#387 in HTTP server

Download history 383/week @ 2024-11-27 34/week @ 2024-12-04 109/week @ 2024-12-11 30/week @ 2024-12-18 70/week @ 2024-12-25 48/week @ 2025-01-01

258 downloads per month

MIT license

15KB
204 lines

A Simple HTTP Server Implementation

Example

Create a server instance and register a GET route:

use guest_server::{Server, HttpResponse};

let mut server = Server::new();

server.get("/", home);

fn home(query_params: Option<Vec<u8>>) -> HttpResponse {
        HttpResponse::new(200, Some("Hello, World!".to_string()))
}

server.listener(80);

No runtime deps