Skip to content

Instantly share code, notes, and snippets.

@Errorific
Last active August 29, 2015 14:22
Show Gist options
  • Save Errorific/f2110306e69079e85b00 to your computer and use it in GitHub Desktop.
Save Errorific/f2110306e69079e85b00 to your computer and use it in GitHub Desktop.
package com.example.basicproject
import dispatch._, Defaults._
object HelloWorld {
def main(args: Array[String]) {
while(true) {
println(System.currentTimeMillis + " start")
val r = (doReq)()
println(r.take(100))
println(System.currentTimeMillis + " finish")
}
}
def doReq = {
val h = Map(
"Content-Type" -> "application/json",
"Authorization" -> ("Bearer token")
)
val u = url("https://ap2.salesforce.com/services/data/v33.0/query/01g28000002bwVSAAY-1500") <:< h
Http(u OK as.String)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment