Send Binary Attachment Data via REST Message

GargiO
Giga Contributor

Hello All,

 

We are looking for a way to send "Binary" attachment data out to ServiceNow via REST Message, we donot want to encode the Data.

 

Regards,

Gargi Ojha

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@GargiO 

you can use setRequestBodyFromAttachment() method of RESTMessageV2

https://developer.servicenow.com/dev.do#!/reference/api/yokohama/server/sn_ws-namespace/c_RESTMessag... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

GargiO
Giga Contributor

This solution sends the attachment in base64 encoded format. We need to send the data in binary(bytes) format. 

Ankur Bawiskar
Tera Patron
Tera Patron

@GargiO 

you can use setRequestBodyFromAttachment() method of RESTMessageV2

https://developer.servicenow.com/dev.do#!/reference/api/yokohama/server/sn_ws-namespace/c_RESTMessag... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader