RM Misunderstanding w/ variables and URL Encoding

If one issues an HTTP Get with RM, it doesn't do any URL Encoding and as a result Groovy might complain about "Illegal characters" and refuse to make the request. Even if one does manage to slip something by, the receiving server is just as likely to misunderstand or throw a similar tantrum. Unfortunately, however, one is also not allowed to do the URL encoding before handing the data off to RM as when it sees the percent symbols it attempts to insert (nonexistent) variables (at least I assume this is what is happening) and one ends up with corrupt data-- portions missing and a sprinkling of "nulls" thrown in for good measure. :slight_smile:

I haven't been able to come up with a work around for this one yet other than to use my own "encoding" scheme that leverages sequences of URI-kosher characters (%-free, of course) as replacements for the URI-illegal characters. But crimeny... that is just plain NOT FUN. Especially if I try to do a complete implementation in RM. :slight_smile:

Hi @bravenel . I wanted to make sure the team is aware of this problem. Thx

1 Like

I understand the problem.

There is a work around: Put the URL into a string variable using some other character in place of the %, e.g. ^. Then replace the ^ with %. Then use that variable in the HTTP Get.

Or, if the issue you have is with URL encoding of blanks, you could do this: Put the URL with the embedded blanks into a variable, then replace the " " with "%20". Then, that variable goes in the HTTP Get.