How to set request body as attachment plus json payload to call API in servicenow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
how we can set attachment and json body as request body in servicenow to call the api i tried below script but it it sending binary data and api is not accepting binary data
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello @supriyanika ,
Try converting your JSON to string and then set to the request-body.
r.setRequestBody(JSON.stringify(body));
If my response helped mark as helpful and accept the solution.
