Package blue.starry.penicillin.core.session

Types

Link copied to clipboard
interface ApiClient : Closeable

Penicillin Api Endpoints controller.

Link copied to clipboard
data class Session(    val client: ApiClient,     val httpClient: HttpClient,     val credentials: Credentials,     val option: ApiConfig,     shouldCloseHttpClient: Boolean) : Closeable

Penicillin Session instance. Provides HttpClient, credentials, options.

Link copied to clipboard
class SessionBuilder(client: ApiClient)

The builder class that corresponds with Session.

Functions

Link copied to clipboard
fun Session.delete(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates DELETE api request.

Link copied to clipboard
fun Session.get(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates GET api request.

Link copied to clipboard
fun Session.head(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates HEAD api request.

Link copied to clipboard
fun Session.options(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates OPTIONS api request.

Link copied to clipboard
fun Session.patch(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates PATCH api request.

Link copied to clipboard
fun Session.post(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates POST api request.

Link copied to clipboard
fun Session.put(    path: String,     host: EndpointHost = EndpointHost.Default,     builder: ApiRequestBuilder.() -> Unit = {}): ApiRequest

Creates PUT api request.