
com.malliina.logstreams.client.HttpUtil.scala Maven / Gradle / Ivy
package com.malliina.logstreams.client
import java.util.Base64
object HttpUtil {
val Authorization = "Authorization"
def basicAuth(username: String, password: String): KeyValue =
KeyValue(HttpUtil.Authorization, authorizationValue(username, password))
def authorizationValue(username: String, password: String) =
"Basic " + Base64.getEncoder.encodeToString(s"$username:$password".getBytes("UTF-8"))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy