This file contains 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
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) |