Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created March 6, 2014 02:46
Show Gist options
  • Save brentsowers1/9381281 to your computer and use it in GitHub Desktop.
Save brentsowers1/9381281 to your computer and use it in GitHub Desktop.
Making an HTTP Request with Dispatch
import dispatch._
import net.liftweb.json._
val h = new Http
val req = url("https://api.github.com/users/brentsowers1/repos")
// Gets both the headers and response body
val rspStr = h(req >:+ { (headers, req) =>
val hdrs = headers
req as_str
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment