thruster-rs / Thruster

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

Actually use method parameter in thruster_testing::request #127

Closed cquintana-verbio closed 4 years ago

cquintana-verbio commented 4 years ago

Related to https://github.com/trezm/Thruster/issues/126

The generic request method available in the thruster_testing module is the only way to perform a test request and pass custom headers to it. It allows the developer to pass the HTTP method as a string, but when resolving the route it used a hardcoded "GET" instead of the user-supplied method.

This PR fixes it.