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

net.nemerosa.ontrack.kdsl.connector.Connector.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.kdsl.connector

/**
 * Raw HTTP connection.
 */
interface Connector {

    /**
     * Associated URL
     */
    val url: String

    /**
     * Associated token, if any
     */
    val token: String?

    /**
     * Gets some content from a relative URL.
     */
    fun get(
        path: String,
        headers: Map = emptyMap(),
    ): ConnectorResponse

    /**
     * Post a payload to a relative URL.
     */
    fun post(
        path: String,
        headers: Map = emptyMap(),
        body: Any? = null,
    ): ConnectorResponse

    /**
     * Puts a payload to a relative URL.
     */
    fun put(
        path: String,
        headers: Map = emptyMap(),
        body: Any? = null,
    )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy