I'm getting error "HTTP Status 400 – Bad Request" when calling APIs

2023-10-17
If you use Tomcat 8+ as a servlet container (like modern version of Loway product do), it will return an error code 400 if you do not accurately URL-encode all characters according to RFC 7230 and RFC 3986. This often happens when passing a set of elements that are separated by the pipe symbol - so for example a|b will not work, but a%7Cb will. It may also happen if you use other "funny" characters in your requests.

For readability’s sake, the examples on Loway manuals still show the pipe character, but for real calls, you have to URL-encode each input parameter.