In order to access the non-resource API end-points, we can create a js file inside the API folder as a custom client.
using this file we can access endpoints directly by their URL and pass data.
How?
Create an instance of GenericRequest then call one of the following methods:
get(url, params) // HTTP GET Request
post(url, data) // HTTP POST Request
put(url, data) // HTTP PUT Request
delete(url) // HTTP DELETE Request
postWithId(url, id, data) // HTTP POST Request "/url/id"
putWithId(url,id,data) // HTTP PUT Request "/url/id"
What?
Generic API Client
Why?
In order to access the non-resource API end-points, we can create a js file inside the API folder as a custom client. using this file we can access endpoints directly by their URL and pass data.
How?
Create an instance of GenericRequest then call one of the following methods: