Crate tosic_http

Crate tosic_http 

Source
Expand description

§Tosic-HTTP

A powerful and simple HTTP server implementation that relies on tower to handle middleware. The main inspiration for this crate is actix-web and also made to learn more about creating robust and developer friendly code in Rust.

§Important notes

  • This crate is not production ready!
  • Currently, this crate will only run on the nightly version of Rust since it relies on some experimental features. I’m currently working on removing this requirement, but I can’t guarantee that it will be done
  • Breaking changes may happen at anytime since this is still far from a production ready crate

§Examples

See examples folder for a few examples that were used during development of this crate. If there are any questions that are not answered in the examples or on the documentation page, feel free to submit an issue to GitHub.

§Installation

To install this crate run cargo add tosic-http or add it to you Cargo.toml

[dependencies]
tosic-http = "0.0.*"

Modules§

body
All credit goes to actix-web for almost all of this code.
error
Main Error handling of the library
extractors
Extractors are used to automatically extract data from the request to be used in the handler
prelude
Prelude re-exports of the most used traits and types from the crate.
request
The request object contains information about the incoming request
resource
RouteBuilder is a builder pattern for creating routes for an HttpServer.
response
This module contains the definition of the HttpResponse struct and its associated methods.
server
Main entry point for the HTTP server.
services
HttpService trait
traits
Main traits of the framework