lundi 23 février 2015

Scala - Send Multiple Headers with scalaj.http.Http

I am making a post request with the libraries listed below. It seems like my last header is being cut off. Ive tried the following two ways but neither seems to be working.



import scalaj.http._
import scalaj.http.Http


var result = Http("https://example.com" + Key + "/rowset")
.postData(jsonOutput)
.headers(Seq("Authorization" -> ("Bearer " + accessToken)))
.headers(Seq("content-Type" -> "application/json"))


var result = Http("https://example.com" + Key + "/rowset")
.postData(jsonOutput)
.headers(Seq("Authorization" -> ("Bearer " + accessToken), "content-Type" -> "application/json"))




Aucun commentaire:

Enregistrer un commentaire