thruster-rs / Thruster

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

[FEATURE REQUEST] Easier method to read request params #230

Closed Israel-Laguan closed 1 year ago

Israel-Laguan commented 1 year ago

The current way to read request params it's like this:

https://github.com/thruster-rs/Thruster/blob/d80cf36ca3f8f40324dc5325a3c150aa5c833953/thruster/examples/mutable_state.rs#L37-L45

Which for a commonly used section of the request feels long.

An easier way to read the headers (like the context.content_type("application/json"); to set a custom outbound header) would lower the entrance bar for new people trying thruster for use as a server.

Request

trezm commented 1 year ago

Please see #232 for examples!

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?