Package-level declarations

Types

Link copied to clipboard
open class ApiClient(baseUrl: String)
Link copied to clipboard
@Serializable(with = Base64ByteArray.Companion::class)
class Base64ByteArray(val value: ByteArray)
Link copied to clipboard
interface BodyProvider<T : Any>
Link copied to clipboard
open class HttpResponse<T : Any>(val response: HttpResponse, val provider: BodyProvider<T>)
Link copied to clipboard
class MappedBodyProvider<S : Any, T : Any>(provider: BodyProvider<S>, block: S.() -> T) : BodyProvider<T>
Link copied to clipboard
Link copied to clipboard
@Serializable(with = OctetByteArray.Companion::class)
class OctetByteArray(val value: ByteArray)
Link copied to clipboard
data class PartConfig<T>(val headers: MutableMap<String, String> = mutableMapOf(), val body: T? = null)

Defines a config object for a given part of a multi-part request. NOTE: Headers is a Map because rfc2616 defines multi-valued headers as csv-only.

Link copied to clipboard
data class RequestConfig<T>(val method: RequestMethod, val path: String, val headers: MutableMap<String, String> = mutableMapOf(), val params: MutableMap<String, Any> = mutableMapOf(), val query: MutableMap<String, List<String>> = mutableMapOf(), val requiresAuthentication: Boolean, val body: T? = null)

Defines a config object for a given request. NOTE: This object doesn't include 'body' because it allows for caching of the constructed object for many request definitions. NOTE: Headers is a Map because rfc2616 defines multi-valued headers as csv-only.

Link copied to clipboard

Provides enumerated HTTP verbs

Link copied to clipboard
class TypedBodyProvider<T : Any>(type: TypeInfo) : BodyProvider<T>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun collectionDelimiter(collectionFormat: String): String
Link copied to clipboard
fun <T : Any, V : Any> HttpResponse<T>.map(block: T.() -> V): HttpResponse<V>
Link copied to clipboard
fun <T> toMultiValue(items: Array<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String>
fun <T> toMultiValue(items: Iterable<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String>
Link copied to clipboard
inline fun <T : Any> HttpResponse.wrap(): HttpResponse<T>