Package-level declarations

Wrappers for @actions/http-client.

Types

Link copied to clipboard
interface BaseHttpClient<out T : HttpResponse>

A minimal HTTP client, based on @actions/http-client.

Link copied to clipboard
data class BasicAuthHandler(val username: String, val password: String) : HeaderProvider

Request handler for basic auth.

Link copied to clipboard
data class BearerAuthHandler(val token: String) : HeaderProvider

Request handler for bearer auth.

Link copied to clipboard

An object or lambda that provides some headers.

Link copied to clipboard
interface Headers

Read-only non case sensitive HTTP headers.

Link copied to clipboard
typealias HttpClient = BaseHttpClient<*>

A HTTP client, based on @actions/http-client.

Link copied to clipboard

A builder for http client configuration.

Link copied to clipboard
Link copied to clipboard
interface HttpResponse

The response from a HTTP request.

Link copied to clipboard

A typed HTTP response. All casting is done in JS, so this is not type safe.

Link copied to clipboard

Mutable non case sensitive HTTP headers.

Link copied to clipboard

Request handler for personal access token auth.

Link copied to clipboard
fun interface RequestHandler

A handler that modifies outgoing requests and optionally handles authentication on 401s.

Functions

Link copied to clipboard

Get the GitHub actions proxy URL.

Link copied to clipboard
inline fun HttpClient(builder: HttpClientBuilder.() -> Unit = {}): HttpClient

A HTTP client, based on @actions/http-client.

Link copied to clipboard
operator fun Map<String, String>.plus(header: HeaderProvider): Map<String, String>
Link copied to clipboard
Link copied to clipboard
inline fun <R, T : BaseHttpClient<*>> T.use(block: (T) -> R): R

Use a HTTP client, then close it in finally block. Like JVM's use.