thruster-rs / Thruster

A fast, middleware based, web framework written in Rust
MIT License
1.06k stars 47 forks source link

[FEATURE REQUEST] Make extended example on generate Context #229

Closed Israel-Laguan closed 1 year ago

Israel-Laguan commented 1 year ago

Current context examples are limited, and certain standard procedures in servers related to use context (setting certain request states like user auth or moving a value from one middleware to another) are not clear on how to do in thruster.

As a user, I would like to add a new field to the context, for example

Another use case would be to validate input in one middleware, parse/map it, then use this modified data in another middleware.

Request

trezm commented 1 year ago

Please see #232 for examples (specifically the custom Auth one)!

Israel-Laguan commented 1 year ago

Solved in https://github.com/thruster-rs/Thruster/pull/232

Israel-Laguan commented 1 year ago

Can this be closed?