sendV1Request

abstract suspend fun <REQUEST, RESPONSE> sendV1Request(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<List<V1HueResponse<RESPONSE>>>, body: REQUEST? = null, requestSerializer: KSerializer<REQUEST>? = null): 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

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.