sendRequest
abstract suspend fun <REQUEST, RESPONSE> sendRequest(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<HueResponse<RESPONSE>>, body: REQUEST? = null, requestSerializer: KSerializer<REQUEST>? = null): RESPONSE
Make a request to the hue bridge
Note: To avoid specifying serializers, use the putData extension.
Parameters
method
The HTTP request method to use for the request
body
Request data to be encoded and send to the endpoint
pathSegments
A list of strings to url encode and use as the path.
requestSerializer
Serializer to use when encoding the request body.
responseSerializer
Serializer to use when decoding the data from the http response.
Throws
if the response body is unable to be decoded.
if the client has not been configured with a hostname.
if the client's authentication is invalid.
if an error occurs while communicating with the API.