Jaymon / endpoints

Lightweight REST api backend framework that automatically maps urls to python modules and classes
MIT License
29 stars 10 forks source link

Request should have an .args() method #98

Closed Jaymon closed 3 years ago

Jaymon commented 4 years ago

Request has a .kwargs() method that returns all the keywords that would be passed to the controller, it should have a similar .args() method that roughly maps to Request.controller_info["method_args"]

Jaymon commented 3 years ago

There is Request.body_args which contains any list arguments that were in body. The problem is this would be hard to do without having Request.controller_info["method_args"] because Request doesn't automatically know which Request.path_args will be consumed to find the controller.

Request.controller_info["method_args"] is populated by taking the remaining path_args and adding the body_args