Jason Wilson
02/02/2023, 4:15 PMDaniel Mejia
02/02/2023, 4:15 PMJason Wilson
02/02/2023, 4:16 PMDaniel Mejia
02/02/2023, 4:18 PMJason Wilson
02/02/2023, 4:18 PMDaniel Mejia
02/02/2023, 4:19 PMJason Wilson
02/02/2023, 4:21 PMJason Wilson
02/02/2023, 4:22 PMDaniel Mejia
02/02/2023, 4:23 PMroute(":handler/:action?").end()
This means your handler url is {your_domain}/{name_of_your_handler_cfc}/{name_of_your_method_in_that_handler_cfc}
Daniel Mejia
02/02/2023, 4:24 PM<http://mysite.com/user/favorites|mysite.com/user/favorites>
which on the file system would be:
/handlers/user.cfc (which has a method called "favorites")Daniel Mejia
02/02/2023, 4:44 PMcoldbox create
to scaffold a rest application then your handler is already extending that restHandler. if not you can simply type that in your handler. component extends="coldbox.system.RestHandler" {...}
then in your method/action simply return your data struct and the response will json.Daniel Mejia
02/03/2023, 6:08 PM