exec Request

private fun execRequest(method: APIRequest.RequestMethod, endpoint: String, payload: APIRequest.Params? = null): JSONObject

Function 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

payload

: the payload of the request