HttpConnection

class HttpConnection(url: String, method: HttpRequestMethod, bodyMap: Map<*, *>?, bodyString: String?, contentType: String?, headers: List<HttpHeader>, api: GenericSpotifyApi?)

Provides a fast, easy, and slim way to execute and retrieve HTTP GET, POST, PUT, and DELETE requests

Constructors

HttpConnection
Link copied to clipboard
common
fun HttpConnection(url: String, method: HttpRequestMethod, bodyMap: Map<*, *>?, bodyString: String?, contentType: String?, headers: List<HttpHeader> = listOf(), api: GenericSpotifyApi? = null)

Functions

buildRequest
Link copied to clipboard
common
fun buildRequest(additionalHeaders: List<HttpHeader>?): HttpRequestBuilder
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
execute
Link copied to clipboard
common
suspend fun execute(additionalHeaders: List<HttpHeader>? = null, retryIfInternalServerError: Boolean = true): HttpResponse
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toByteArrayContent
Link copied to clipboard
common
fun String?.toByteArrayContent(): ByteArrayContent?
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

api
Link copied to clipboard
common
val api: GenericSpotifyApi? = null
bodyMap
Link copied to clipboard
common
val bodyMap: Map<*, *>?
bodyString
Link copied to clipboard
common
val bodyString: String?
contentType
Link copied to clipboard
common
val contentType: ContentType
headers
Link copied to clipboard
common
val headers: List<HttpHeader>
method
Link copied to clipboard
common
val method: HttpRequestMethod
url
Link copied to clipboard
common
val url: String

Sources

(source)
Link copied to clipboard