Advertisement
Guest User

Untitled

a guest
Aug 20th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import dispatch.Defaults._
  2. import dispatch._
  3.  
  4. import scala.util.{Failure, Success}
  5.  
  6.  
  7. object app extends App {
  8. println("Hello")
  9.  
  10. val http = Http.configure(_ setFollowRedirect(true))
  11. val target = url("https://www.bing.com/")
  12. val f = http(target > as.String)
  13.  
  14. f onComplete{
  15. case Success(x) => println(x.length)
  16. case Failure(y) => println(y.getMessage)
  17. }
  18.  
  19. println("END!!!")
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement