Last active
January 11, 2019 14:34
-
-
Save bastman/130af8a7048c017953be08f5da3bb01e to your computer and use it in GitHub Desktop.
http4-client: basic auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val lowLevelClient = OkHttp() // ApacheClient() | |
private val client = ClientFilters.BasicAuth( | |
user = config.apiUser, password = config.apiPassword | |
).then(lowLevelClient) | |
@PreDestroy | |
fun preDestroy() { | |
logger.info { "CLOSE http client" } | |
lowLevelClient.close() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment