sendPayloadedAPIRequest

Method to send an api request with a payload

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> sendPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, headerKey: String, headerValue: T, payload: APIRequest.Params)

Method to send an api request with a payload 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 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


open fun sendPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, payload: MultipartBody)

Method to send an api request with a payload

Parameters

requestUrl

: "URL" used in the api request

method

: method used in the api request

payload

: the multipart payload of the request


open fun <T> sendPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, headerKey: String, headerValue: T, payload: MultipartBody)

Method to send an api request with a payload 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

: the multipart payload of the request


open fun sendPayloadedAPIRequest(requestUrl: String, method: APIRequest.RequestMethod, headers: APIRequest.Headers, payload: MultipartBody)

Method to send an api request with a payload 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

: the multipart payload of the request