Skip to content

Files

Latest commit

6a2b527 · Mar 5, 2024

History

History

handlers

Handler Examples

A collection of crates that provide examples of handlers, the primary building block of a Gotham web framework application.

A Handler is an asynchronous function, taking a State value which represents the request and related runtime state. It completes by resolving to a HTTP response.

Developers working with the Gotham web framework create handlers and via the Router map them to individual routes. The Router then invokes the appropriate Handler to process incoming requests.

Ordering

We recommend reviewing our handler examples in the order shown below:

  1. Request Data - Accessing common request information
  2. Stateful Handlers - Keeping state in a handler
  3. Simple Async Handlers - Async Request Handlers 101
  4. Simple Async Handlers (.await version) - Request Handlers that use async/.await
  5. Async Handlers - More complicated async request handlers

Help

You can get help for the Gotham web framework at:

License

Licensed under your option of:

Community

The following policies guide participation in our project and our community: