All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pusher.platform.RequestOptions.kt Maven / Gradle / Ivy

package com.pusher.platform

import elements.emptyHeaders

data class RequestOptions(
    val destination: RequestDestination,
    val method: String = "GET",
    val headers: elements.Headers = emptyHeaders(),
    val body: String? = null
) {
    constructor(
        path: String,
        method: String = "GET",
        headers: elements.Headers = emptyHeaders(),
        body: String? = null
    ) : this(RequestDestination.Relative(path), method, headers, body)
}

sealed class RequestDestination {
    data class Relative(val path: String) : RequestDestination()
    data class Absolute(val url: String) : RequestDestination()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy