Leaf v1.4.2 includes a core api controller which you can extend to create your own controllers. This gives you access to a bunch of handy functions for use in your API.
Including the API controller
To include the API Controller object in a route, use this:
ResponsesLeaf Core controller contains methods to appropriately return data to the user.
respond returns json encoded data to the user.
respond returns json encoded data to the user along with an HTTP code.
file_upload is for simple file uploads. It takes in 3 parameters, the path to save the file, the file and the file type(optional).
Objectify converts an array to an object.
Next StepsSimple Routing