Forum Discussion
I was kinda hoping someone would offer a suggestion on who to give the Solution to ;)
Also wanted to come back.. I've encountered another small thing that directly related to this. I've added the call I mentioned earlier that gets the deviceId value from ../rest/device/devices?filter=name:"{{var1}}*" except Jira claims :Illegal character in query at index 72
The URL sent is: https://xxxxxx.logicmonitor.com/santaba/rest/device/devices?filter=name~"new-hostaa01.xxxx.net*"
I've sanitized but maintained the number of characters.. Its complaining about the tilde, I tried replacing it with the colon but it generated the same error on the same character.
Exact same call from Postman (like earlier) works. X-Version:3 header in both.
- Mike_Moniz8 months agoProfessor
Try replacing "~" with "%7E"
- Skeer8 months agoNeophyte
Taking this suggestion I replaced the :" with %3A%22 and the trailing " with another %22.
This time the call looks like it might have been sent. I need to add a couple more audit log actions. But it's a solid maybe!
- Anonymous8 months ago
endoceURIComponent() in javascript. Do that to your query parameter values.
- Anonymous8 months ago
encodeURIComponent()
We have AI that can paint the mona lisa, but it can't detect spelling errors?
- Anonymous8 months ago
Postman automatically encodes the values, but your JS might not be doing that. So if it works in postman with the ~, but not in your JS, you need to encode the string that contains the ~ using encodeURIComponent().
Related Content
- 4 months ago