Illegal Character in REST Argument

Hi,

I am currently interfacing to a system using a REST interface. I also use Postman to do sanity checking on my query strings to verify legit parameters before going to KNIME.

I have a query in the following format:
https://ACCESSPOINTADDRESS/filter?limit=25&offset=0&fields=employeenumber,employeename,date&restriction=date>date(2018,7,1)&orderby=+date,-employeename

It works on Postman, but Knime does not like this - it throws an “illegalArgumentException” at postion xyz - I traced the position to the characters “>date(2018,7,1)”. Am I doing something wrong - is it a parsing bug, or is there an alternative syntax I should use?

As you can also nicely see by the automatic link conversion of your post, > is not an allowed character in a URL. You have to %-encode the character, in your case %3E. The same may also be true for ( and ) and is certainly true for + because in query parameters it’s a replacement for space.

I’ve experienced the same issue. i resolved it looking at this post

I think it’s the best solution so far.

That won’t help in this case. Here we are talking about correct encoding of the URL whereas your problem was encoding the request body with a specific encoding.

Sorry i remember it was doing both things.
For this specific task i usually build the url (it has a specific sintax) , in this way you dont encode wrong characters like =
You usually need to do this in a java snippet because automatic conversion doesn’t work

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.