sendRequest
open suspend override fun <REQUEST, RESPONSE> sendRequest(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<HueResponse<RESPONSE>>, body: REQUEST?, requestSerializer: KSerializer<REQUEST>?): 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
SerializationError
if the response body is unable to be decoded.
HostnameNotSetException
if the client has not been configured with a hostname.
UnauthorizedException
if the client's authentication is invalid.
NetworkException
if an error occurs while communicating with the API.