Application/x-www-form-urlencoded does not seem to work

I’m porting over some Postman tests to Katalon, luckily the fields and menus are essentially the same. My issue is that I’m unable to set the Content-Type to be application/x-www-form-urlencoded

I’m not sure what I’m doing wrong here, but the error message I’m receiving when sending a request suggests that the data sent is not being encoded properly. The following is cut form the error message:

“message”:"The key \u0022_username\u0022 must be a string, \u0022NULL\u0022 given…

Have seen the same issue here but with no replies: Unable to set x-www-form-urlencode params in http body-Getting error "unsupported_grant_type"

Would anybody have any idea what I’m doing wrong, or is this an issue with the software itself? Thank you very much.

Hi Jack

Can you post the message with more context around it? I’d like to see it in the context of the rest of the messages around it.

u0022 is the double-quote character -> " <- so the question I have is, is the mention of u0022 part of the error or is that a suggestion as to what you should do to fix the issue: "_username"

Sure thing @Russ_Thomas ;

‘Quantum’ is the name of the server
_username is the name of the Username variable

The only issue I can think is that the " isn’t being decoded, and is being interpreted as u0022

“message”:“The key \u0022_username\u0022 must be a string, \u0022NULL\u0022 given.\nFile/var/www/quantum/vendor/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php\nLine89”


My interpretation of that is, it wants you to wrap the reference to _username in double-quotes "_username".

The response is JSON. It is packaged that way in the expectation that it might be re-presented using JSON.parse/stringify or similar.

" is u0022.

Caveat: I don’t do WS testing like this so I’m not very familiar with the Kat APIs in this area.