REST call string: illegal character

0
Hi all, I am building a autocomplete function for an address, I am getting the following error: com.mendix.modules.microflowengine.MicroflowException: Illegal character in query at index 76: https://saas.afrigis.co.za/intiendols/autocomplete//?query=bella+rosa&token= This is an example python code on the documentation for API: request = request + '/?' + queryString + "&token=" + str(token) Currently we are building the string using Mendix with a java action.  Looks like there is an issue with the ampersand character.  Any thoughts? 
asked
1 answers
1

I would think either your query string or token has an illegal character in it. How are you building it?

Assuming you have the query string in a variable called $queryString, and the token in a variable called $token, you could look to build the URL using urlEncode to encode those value like this.

'https://saas.afrigis.co.za/intiendols/autocomplete/?query=' + urlEncode($queryString) + '&token=' + urlEncode($token)

 

answered