sendJSONPayloadedAPIRequest

Method to send an api request with a payload formatted in "JSON"

Parameters

requestUrl

: "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

requestUrl

: "URL" used in the api request

method

: method used in the api request

headerKey

: header key for the request

headerValue

: header value for the request

payload

: params to insert in the payload for the "HTTP" request


Method to send an api request with a payload formatted in "JSON" and with different headers

Parameters

requestUrl

: "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