Last active
April 18, 2017 03:40
-
-
Save w1shen/e4f1c539a0ed10910d3e to your computer and use it in GitHub Desktop.
Post JSON by Dispatch
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 req = url("localhost").POST | |
.as_!("username", "password") | |
.setBody("body") | |
.setContentType("application/json", "UTF-8") | |
val future = Http(req OK as.String) | |
val rep = Await.result(future, 5.seconds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment