Last active
December 21, 2015 14:49
-
-
Save petrovg/6322197 to your computer and use it in GitHub Desktop.
Consuming a web resource in chunks with a Play framework Iteratee
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
| import play.api.libs.ws._ | |
| import play.api.libs.iteratee._ | |
| import scala.concurrent.ExecutionContext.Implicits.global | |
| WS.url("http://www.bbc.co.uk").get( resp => Iteratee.fold(0) { (i:Int, el:Array[Byte] ) => println(el); i + 1} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment