startRequest
fun startRequest(method: Methods, formParameters: String? = null, queryParameters: String? = null, headers: String? = null, listener: OkHttpListener)
Starts an HTTP request using OkHttp library.
Parameters
method
the type of HTTP method to be used
formParameters
the JSON data of form parameters to be sent with the POST request (optional, default is null
)
queryParameters
the JSON data of query parameters to be sent with the POST request (optional, default is null
)
headers
the JSON data of headers to be added to the request (optional, default is null
)
listener
the callback listener for the HTTP request
See also
Request
Throws
if the endpoint type is not supported