最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - HTTP requests from Postman to JBoss - Stack Overflow

programmeradmin4浏览0评论

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.

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.

Therefore, in my point of view I have two options:

  1. Find a way to URL encode the entire query String using a test script in Postman
  2. Find a way to make JBoss accept URL decoded requests

What do you remend, and how do you do it?

Thank you!

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.

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.

Therefore, in my point of view I have two options:

  1. Find a way to URL encode the entire query String using a test script in Postman
  2. Find a way to make JBoss accept URL decoded requests

What do you remend, and how do you do it?

Thank you!

Share Improve this question asked Mar 18, 2016 at 13:13 RedEagleRedEagle 4,5809 gold badges43 silver badges68 bronze badges 3
  • Here they say that you can do it with right click -> EncodeURIComponent. Are you referring to that as missing in the new version? – Dragan Bozanovic Commented Mar 26, 2016 at 11:00
  • Exactly, the option is missing since 4.1.2. Nonetheless I would prefer a solution using option 2 – RedEagle Commented Mar 26, 2016 at 19:33
  • Which version of JBoss are you using? – gustf Commented Apr 1, 2016 at 20:01
Add a ment  | 

3 Answers 3

Reset to default 4

You should not use the option 2 as it will be less secure to allow decoded special characters (vulnerable to cross site scripting, csrf)

The best way is to use some online tool like http://www.freeformatter./html-escape.html to encode your URL before sending it to server. Alternatively you can create a simple java tool that does this using Apache API (escapeHTML())

Since Wildfly 8 the underlying HTTP implementation is Undertow that includes HTTP2 support. There is a decode-url configuration parameter which when set to false will allow decoded request parameters. More info here.

This is a Postman-bug, they are working on it

https://github./postmanlabs/postman-app-support/issues/1893

Just also want to mention, an URI should always be URI-encoded, otherwise is not a valid URI.

You can however configure JBoss how to dedode the URI-encoded URI. If this is what you want to do check out the URIEncoding and useBodyEncodingForURI attributes in jbossweb docs

发布评论

评论列表(0)

  1. 暂无评论