Pass variable as argument to setStringParameterNoEscape('name', 'value' );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2019 07:38 AM
Trying unsuccessfully to pass a populated variable instead of a string.
This works
r.setStringParameterNoEscape('engine', '192.168.5.5:1671' );
This does not
var target = "192.168.5.5:1671"
r.setStringParameterNoEscape('engine', target );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2021 03:34 PM
I have encountered the same issue. I believe either a bug exists or the documentation for the
setStringParameter(String name, String value)
needs to be changed to specify that, as
name only accepts plain text enclosed in single quotes. Period.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 03:59 AM
I know that it is old post, but I have faced similar issue and I resolved that by encoded URI. I this case it should be encodeURI(target) and then passing it to r.setStringParameterNoEscape as second param. I hope that it helps someone 🙂