Companion

Properties

Link copied to clipboard

The subject's string form, rendered from its path parts and query parameters.

Functions

Link copied to clipboard
fun buildPath(pathParameters: List<String>, queryParameters: SortedMap<String, String>): String
Link copied to clipboard
operator fun invoke(vararg pathParameters: String): Subject
operator fun invoke(pathParameters: List<String>, queryParameters: Map<String, String> = emptyMap()): Subject

Kotlin sugar for of, so that a Subject can be constructed as Subject(...).

Link copied to clipboard
fun of(vararg pathParameters: String): Subject

Creates a Subject from its path parts, with no query parameters.

fun of(pathParameters: List<String>, queryParameters: Map<String, String> = emptyMap()): Subject

Creates a Subject from its pathParameters and optional queryParameters. Its path is rendered by URL-encoding each path part and joining them under a leading /, with any query parameters appended as ?a=b&c=d in name order.