Why does my API return illegal character error when I call it in the app?

I've tested the API using get method that has two parameters in the Rest Service and in Postman. It works fine both places. Only when I call it in the microflow and check for response in a Show Message, it throws me this error.   It says 'illegal character in path at index 88'.
1 answers

How are you building your URL to call the REST service? If you are appending String elements you may have some illegal characters that you need to escape. If they are parameters pass them through the urlEncode function.


For example...

'http://google.com/search?q=' + urlEncode($myQuery)