RedEagle
RedEagle

Reputation: 4570

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!

Upvotes: 4

Views: 1668

Answers (3)

ozoli
ozoli

Reputation: 1424

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.

Upvotes: 4

gustf
gustf

Reputation: 2017

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

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.

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

Upvotes: 1

Amit Mahajan
Amit Mahajan

Reputation: 915

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())

Upvotes: 4

Related Questions