Created
February 10, 2017 20:38
-
-
Save edwelker/b535bb3b6e443b2b35e31567f3a06818 to your computer and use it in GitHub Desktop.
Eddie is awesome, with his stink.
This file contains 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
val credentials = for { | |
// Create credentials | |
username <- Utils.username | |
password <- Utils.password | |
} yield BasicAuth.client(username, password) | |
//TODO: connection pooling https://twitter.github.io/finagle/guide/Clients.html#pooling | |
val client = for { | |
host_port <- Utils.host_port | |
} yield Http.client.withTlsWithoutValidation.newService(host_port) | |
val credential_client = for { | |
creds: Client <- credentials | |
cli: Service[Request, Response] <- client | |
} yield creds.andThen(cli)(request) | |
credential_client |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment