send JSONPayloaded APIRequest
open fun sendJSONPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, payload: APIRequest.Params)
Method to send an api request with a payload formatted in "JSON"
Parameters
request Url
: "URL"
used in the api request
method
: method used in the api request
payload
: params to insert in the payload for the "HTTP"
request
open fun <T> sendJSONPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, headerKey: String, headerValue: T, payload: APIRequest.Params)
Method to send an api request with a payload formatted in "JSON"
and with a single header
Parameters
request Url
: "URL"
used in the api request
method
: method used in the api request
header Key
: header key for the request
header Value
: header value for the request
payload
: params to insert in the payload for the "HTTP"
request
open fun sendJSONPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, headers: APIRequest.Headers, payload: APIRequest.Params)
Method to send an api request with a payload formatted in "JSON"
and with different headers
Parameters
request Url
: "URL"
used in the api request
method
: method used in the api request
headers
: headers for the request
payload
: params to insert in the payload for the "HTTP"
request