Next: Error handling, Previous: Starting the API, Up: Top [Contents][Index]
The define-api macro creates a function for accessing the api for each resource operation.
Before using the generated functions, the api backend needs to be selected via the with-api-backend.
Execute the client resource operation calling backend
For instance, for the api defined above, an get-user
and a get-users
functions are created, which can be used like this:
(with-api-backend "http://localhost/api" (get-user 22))
Assuming the api is running on ‘http://localhost/api
’
Next: Error handling, Previous: Starting the API, Up: Top [Contents][Index]