我是Scala&Play的新手,想知道是否可以使用Play api提供的请求检查URL方案(http / https)?我尝试了文档中提到的某些属性,但这些属性无法按我期望的那样无法提供URI中的方案。
我可以使用Play request api在模板中获取方案吗?任何输入都会有所帮助。
//code
h2.host
= request.path
= request.method
= request.uri
= request.domain
= request.host
// output
<h2 class="host">
/test/8549
GET
/test/8549
localhost
localhost:9000
</h2>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句