parameters
abstract fun <P : Parameters> parameters(build: ParameterConstructor<P>): AnyEndpoint.Builder(source)
Declares query parameters that the client will need to provide to the server.
To learn more about representing parameters, see Parameters.
Example
// Create a type to hold the parameters
class UserListParams(data: ParameterStorage) : Parameters(data) {
var onlyActive: Boolean by parameter(default = false)
var createdAfter: Instant? by parameter()
}
val list by get()
.parameters(::UserListParams)
.response<UserDto>()Content copied to clipboard