exec
Request
private fun execRequest(method: APIRequest.RequestMethod, endpoint: String, query: APIRequest.Params? = null, payload: APIRequest.Params? = null): JSONObject
Method to execute a request to the backend
Return
the result of the request as JSONObject
Parameters
method
The method of the request
endpoint
The endpoint path of the request url
query
The query parameters of the request
payload
The payload of the request