Last active
August 29, 2015 14:22
-
-
Save Errorific/f2110306e69079e85b00 to your computer and use it in GitHub Desktop.
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
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