带有Scala和Dispatch的HTTPS POST

带有Scala和Dispatch的HTTPS POST,scala,https,scala-dispatch,Scala,Https,Scala Dispatch,我正在尝试使用scala和Dispatch库发布HTTPS帖子。我找不到将我的连接标记为https而不是http的位置。这是我到目前为止的代码 println("Running Test") val http = new Http val req = :/("www.example.com" , 443) / "full/path.asp" var response: NodeSeq = Text("") http(req << "username=x&password=y"

我正在尝试使用scala和Dispatch库发布HTTPS帖子。我找不到将我的连接标记为https而不是http的位置。这是我到目前为止的代码

println("Running Test")
val http = new Http
val req = :/("www.example.com" , 443) / "full/path.asp"
var response: NodeSeq = Text("")
http(req << "username=x&password=y" <> {response = _ } )
response
println("Done Running Test")
println(“运行测试”)
val http=新的http
val req=:/(“www.example.com”,443)/“full/path.asp”
变量响应:NodeSeq=Text(“”)

http(req因此,在尝试弄清楚这一点之后,我找到了需要什么,http行应该是这样的

http(req.secure << "username=x&password=y" <> {response = _ } )    
http(req.secure << ("username=x&password=y","application/x-www-form-urlencoded") <> {response = _ } 
http(req.secure您可以对:/factory应用“secure”:

:/("host").secure

我想知道你在调度组问这个问题是否会更幸运。这不会取代?无论如何,请回答你自己的问题。这是一个有效的问题,有一个有效的答案。
http(req.secure << ("username=x&password=y","application/x-www-form-urlencoded") <> {response = _ } 
:/("host").secure