Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

that example isn't very good.. here's what the resource-registration for "/products" endpoint would look like (note the http method), where I've lazily omitted "/products" a level above because I wanted you just to see the http methods:

    web::resource("")
           .route(web::get().to_async(products::get_products))
           .route(web::post().to_async(products::add_product))


This syntax makes it look almost like [warp's](https://github.com/seanmonstar/warp) "filters".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: