- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2018 02:49 AM
Hi experts,
I have coded a very simple RESTful post and run it in Scripts-Background.
var request = new sn_ws.RESTMessageV2('RemoteServer','Post');
request.setQueryParameter("strBase64", strBase64);
I am trying to send String "strBase64" which is Base64 encoding of an attachment.
However, looks like it has a size limitation, only a couple of KB is allowed to send.
I am quite sure that it is a service now side problem because I have also tried a Java client call and it worked.
Can anyone help?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 12:01 AM
This issue has been solved.
Looks like Service Now has a length limitation setting on "request.setQueryParameter()", while Java doesn't.
I used setRequestBody and large content can be sent out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2018 12:11 AM
Hi, thanks for the updating.
Firtst, setRequestBodyFromAttachment() may not work for my case, because I want to send a multi/part request like: Content-Type: multipart/form-data; boundary=_Part_12_16505077.1545180476892.
Second, about the request size topic, I have also tried "glide.rest.scripted.max_inbound_content_length_mb" and set it to 10, but it didn't solve my problem. Actually, my attached picture is just 160K, but it's still too big for the request. I am afraid that "setQueryParameter" methods has some limits.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2018 01:18 AM
For some reaons, I cannot see what I posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 12:01 AM
This issue has been solved.
Looks like Service Now has a length limitation setting on "request.setQueryParameter()", while Java doesn't.
I used setRequestBody and large content can be sent out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 12:06 AM
glad you solved it.
you can mark your answer correct and close this thread.