Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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 recommend, and how do you do it?

Thank you!

like image 249
RedEagle Avatar asked Jan 06 '23 10:01

RedEagle


2 Answers

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.com/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())

like image 169
Amit Mahajan Avatar answered Jan 08 '23 22:01

Amit Mahajan


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.

like image 36
ozOli Avatar answered Jan 08 '23 23:01

ozOli