0
我正尝试使用play framework和scala发送发送请求到外部URL。我想添加一些参数给身体也。 我想发送邮寄请求到“http://www.posonlinedemo.tk”,参数为TransactionNo ='T10000' and reqtype ='T' 我怎么能这样做?使用scala和发送框架发送POST请求与身体
这里是我的行动
def test(para:String) = Action {
val url: Option[String] = Some("http://www.posonlinedemo.tk")
url match {
case Some(url) => Redirect(url)
case None => NotFound("This URL leads nowhere. :(")
}
}
ws不支持。我也跟着你的链接。很少有编译错误。 **对象HttpEntity不是包的成员play.api.http ** **对象流不是包akka的成员** –
哪个版本的Play!你正在用吗?我已发布的代码剪辑与Play一起编译! 2.4和Play! 2.5是否正确地将ws添加到您的库依赖项中,然后将其注入或导入到使用它的文件中。 – Simon
我使用的版本是2.4.6 –