sendV1Request

open suspend override fun <REQUEST, RESPONSE> sendV1Request(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<List<V1HueResponse<RESPONSE>>>, body: REQUEST?, requestSerializer: KSerializer<REQUEST>?): RESPONSE

Make a request to the hue bridge as a V1 endpoint.

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.