REST API extended special characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 03:05 PM
Hi, the “????” (eye chars) in the following REST POST JSON payload is resulting in HTTP 500 failure. Is there anyway available to pass these characters?
{
"sysparm_quantity": 1,
"variables": {
"AS_Support_var112": "Engineering Request",
"Messaging_Detailed_Desc": "High Priority: Message Pullback Request\nPlease prioritize this request in order to mitigate the threat contained within these emails.\r\nWe need your assistance with removing the following email(s) from users' mailboxes and also submitting a sample to Cisco to classify the email(s) as Phishing/Malware to prevent their future delivery. These emails were delivered as part of a recent phishing campaign that GCR observed.\r\n\r\nPhishing Email(s) Details\r\n\r\nSender: marketing@mention.com\r\n\r\nRecipient: XXX.XXX@XXX.com, XXX.XXX@XXX.com\r\n\r\nSubject: XXX.XXXAdmin #o38A3s#, \", which Christmas song are you? ????\"\r\n\r\nAttachment Name: \r\n\r\nDelivery Timeframe: \r\n\r\nEmail Type: Phishing/Malware\r\n\r\nPlease contact GCR if you require any additional information.",
"common_ReqBy": "7e0675dadb215090e6a99ac4db96193f",
"common_ReqFor": "7e0675dadb215090e6a99ac4db96193f"
}
}
Thank you, Charlie
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 03:15 PM
Possibly try setting the charset in the headers
For example
Content-type: application/json; charset=utf-8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 03:29 PM
Hi Chris, yes I found that suggestion in another post, and tried it but failure was the same.
this.logger.info("_postServiceCatalogItem.Content-type: " + rm.getRequestHeader('Content-type'));
Log: _postServiceCatalogItem.Content-type: application/json; charset=utf-8
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 05:11 PM
Try replacing the url encoded character "%F0%9F%91%81" (without the quotes) instead of the eye character.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 05:18 PM