[英]HTTP requests from Postman to JBoss
In previous versions of Google Chrome's Postman plugin, I used to make HTTP requests, but had do URL encode query string values that had special characters using the URL encode option. 在以前版本的Google Chrome的Postman插件中,我曾经发出HTTP请求,但是使用URL编码选项进行了具有特殊字符的URL编码查询字符串值。
In the current version of Postman the option was removed, and since JBoss does not allow URL decoded requests, the use of Postman is now seriously nauseous. 在Postman的当前版本中,该选项被删除,并且由于JBoss不允许URL解码请求,因此Postman的使用现在非常恶心。
Therefore, in my point of view I have two options: 因此,在我看来,我有两个选择:
What do you recommend, and how do you do it? 你推荐什么,你怎么做?
Thank you! 谢谢!
Since Wildfly 8 the underlying HTTP implementation is Undertow that includes HTTP2 support. 从Wildfly 8开始,底层的HTTP实现是包含HTTP2支持的Undertow。 There is a decode-url configuration parameter which when set to false will allow decoded request parameters. 有一个decode-url配置参数,当设置为false时,将允许解码的请求参数。 More info here . 更多信息在这里 。
You should not use the option 2 as it will be less secure to allow decoded special characters (vulnerable to cross site scripting, csrf) 您不应该使用选项2,因为它不太安全,不允许解码的特殊字符(易受跨站点脚本编写,csrf)
The best way is to use some online tool like http://www.freeformatter.com/html-escape.html to encode your URL before sending it to server. 最好的方法是使用某些在线工具(如http://www.freeformatter.com/html-escape.html)对URL进行编码,然后再将其发送到服务器。 Alternatively you can create a simple java tool that does this using Apache API (escapeHTML()) 或者,您可以创建一个使用Apache API(escapeHTML())执行此操作的简单Java工具
This is a Postman-bug, they are working on it 这是一个Postman-bug,他们正在研究它
https://github.com/postmanlabs/postman-app-support/issues/1893 https://github.com/postmanlabs/postman-app-support/issues/1893
Just also want to mention, an URI should always be URI-encoded , otherwise is not a valid URI. 还要提一下,URI应该始终是URI编码的 ,否则不是有效的URI。
You can however configure JBoss how to dedode the URI-encoded URI. 但是,您可以配置JBoss 如何对URI编码的URI进行解码。 If this is what you want to do check out the URIEncoding
and useBodyEncodingForURI
attributes in jbossweb docs 如果这是你想要做的, 请查看jbossweb文档中的URIEncoding
和useBodyEncodingForURI
属性
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.