HttpRequest

class HttpRequest(val url: String, val method: HttpRequestMethod, val bodyMap: Map<*, *>?, val bodyString: String?, contentType: String?, val headers: List<HttpHeader> = listOf(), val api: GenericSpotifyApi? = null)(source)

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

Constructors

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

Properties

Link copied to clipboard
val api: GenericSpotifyApi? = null
Link copied to clipboard
val bodyMap: Map<*, *>?
Link copied to clipboard
Link copied to clipboard
val contentType: ContentType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val url: String

Functions

Link copied to clipboard
fun buildRequest(additionalHeaders: List<HttpHeader>?): HttpRequestBuilder
Link copied to clipboard
suspend fun execute(additionalHeaders: List<HttpHeader>? = null, retryIfInternalServerErrorLeft: Int? = SpotifyApiOptions().retryOnInternalServerErrorTimes): HttpResponse
Link copied to clipboard
fun String?.toByteArrayContent(): ByteArrayContent?
Link copied to clipboard
open override fun toString(): String