Skip to content

Instantly share code, notes, and snippets.

import scala.util.parsing.json.JSON
import scalaj.http.Http
// Assumes a list of objects. If response i only as single object, the last
// .asInstanceOf[Seq[Map[String, Any]]] could be changed to .asInstanceOf[Map[String, Any]]
def getService(serviceURL: String, serviceAuthToken: String): Seq[Map[String, Any]] = {
JSON.parseFull(
Http(serviceURL)
.timeout(connTimeoutMs = 600000, readTimeoutMs = 10000)