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

com.github.zeldigas.confclient.ConfluenceUrls.kt Maven / Gradle / Ivy

The newest version!
package com.github.zeldigas.confclient

import io.ktor.http.*

fun makeLink(baseUrl: String, linkFromApi: String) = makeLink(Url(baseUrl), linkFromApi)

fun makeLink(confluenceBaseUrl: Url, linkFromApi: String): Url {
    val segments = linkFromApi.split('/').filter { it.isNotEmpty() }

    return URLBuilder(confluenceBaseUrl).appendEncodedPathSegments(segments).build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy