virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
9 stars 8 forks source link

Plugin handlers can return results #27

Closed olanod closed 3 years ago

olanod commented 3 years ago

To use the ? operator handlers should be able to return a Result(probably a re-export of http_types::Result). The macro would still allow to return a plain response.

// this works
#[vlugin]
async fn handler(req: Request) -> Response {} 
// this as well
#[vlugin]
async fn handler(req: Request) -> Result {}