rust-web-server 17.44.0

An HTTP web framework, reverse proxy, and server for Rust supporting HTTP/1.1, HTTP/2, and HTTP/3. Config-driven proxy mode (rws.config.toml with [[route]] / [[upstream]]) or library crate. No third-party HTTP dependencies.
Documentation
//! Convenience re-exports for writing handlers and running the server.
//!
//! A single glob import covers the types you need in almost every handler:
//!
//! ```rust,no_run
//! use rust_web_server::prelude::*;
//!
//! fn hello(_: &Request, _: &PathParams, _: &ConnectionInfo, _: &()) -> Response {
//!     Response::get_response(
//!         STATUS_CODE_REASON_PHRASE.n200_ok,
//!         None,
//!         Some(vec![Range::get_content_range(
//!             b"Hello, world!".to_vec(),
//!             MimeType::TEXT_PLAIN.to_string(),
//!         )]),
//!     )
//! }
//!
//! fn main() {
//!     let app = App::with_state(()).get("/hello", hello);
//!     let (listener, pool) = Server::setup().unwrap();
//!     Server::run(listener, pool, app);
//! }
//! ```

pub use crate::app::App;
pub use crate::core::New;
pub use crate::mime_type::MimeType;
pub use crate::range::Range;
pub use crate::request::Request;
pub use crate::response::{Response, STATUS_CODE_REASON_PHRASE};
pub use crate::router::PathParams;
pub use crate::routes;
pub use crate::server::{ConnectionInfo, Server};