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
A method to access request params, for example a HashMap context.params() so users can .get("paramKey") related to a param like in GET /posts/:id
Add a new example using it, or include it in an already made example.
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
context.params()
so users can.get("paramKey")
related to a param like inGET /posts/:id