thruster-rs / Thruster

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

Actually use the request method in thruster_testing::request #126

Closed cquintana-verbio closed 4 years ago

cquintana-verbio commented 4 years ago

The request method is the generic version for the thruster_testing request methods, and is the only way to pass headers when writing tests.

However, despite allowing the developer to write the method as a String, it only allows testing GET methods, as the route resolver does not use the method param:

https://github.com/trezm/Thruster/blob/master/thruster-app/src/testing.rs#L26

trezm commented 4 years ago

🤦‍♀️yes, you are absolutely right! Clearly a dumb mistake by me. I'll be able to fix this in the next few days, or feel free to put up a PR if you beat me to it!