The argument to OK or > is just a function (Response => T):
scala> Http(url("
http://www.google.com") OK { x => x.getStatusCode} )
res11: dispatch.Future[Int] = scala.concurrent.impl.Promise$DefaultPromise@aa17f2c
scala> for (r <- res11) println(r)
200
The simplest function you could use here would be the identity function, after which you can extract the response from the future and process it however you like:
scala> Http(url("
http://www.google.com") > identity)
res14: dispatch.Future[com.ning.http.client.Response] = scala.concurrent.impl.Promise$DefaultPromise@1b87c128
scala> res14.foreach { r =>
| println(r.getStatusCode)
| println(r.getResponseBody.take(100))
| }
scala>
200
<!doctype html><html itemscope="" itemtype="
http://schema.org/WebPage" lang="en"><head><meta content