Outbound REST - Multipart/form-data

jitesh_zende1
Tera Contributor

Hi,

I want to call a third party REST call from service now but the issue is that it accepts the content-type as "multipart/form-data" only, is someone has any suggestion?

Any help is appreciated.

Thanks & Regards,

Jitesh Zende

5 REPLIES 5

Sandeep Kumar6
Giga Guru

Hi Jitesh,

 

Its been confirmed by ServiceNow that they do not support content-type as "multipart/form-data"  .The only solution is either use Mid server or create own proxy server where you can send as Binary Stream .

 

There are others content-type as "Application/Json" which  you can use.

Just to keep in mid that ServiceNow sends Text data out of ServiceNow.

reference:

https://community.servicenow.com/community?id=community_question&sys_id=a8df36addb58dbc01dcaf3231f9619fb

https://community.servicenow.com/community?id=community_question&sys_id=c78487a9dbd8dbc01dcaf3231f96191d

 

Or 

You can take help from here:

https://docs.servicenow.com/integrate/inbound_rest/reference/r_SamplePOSTMultipart.html

 

Please hit like if this helped you.

 

regards

Sandeep

Mohammed_Iqbal
Tera Guru

Hello,

have you tried to pass HTTP headers in rest message.

find_real_file.png

HOPE THIS HELPS!!!! MARK CORRECT OR HELPFUL.

 

Regards,

Mohammed Iqbal

 find_real_file.png

www.dxsherpa.com

Harsh Vardhan
Giga Patron

jitesh_zende1
Tera Contributor

Hi Sandeep,

Can you please provide me some more information about how can we use mid server here. I am trying the same by creating the mid server script and jsprobe but somehow I am not able to manage it. I am trying the orchestration's jsprobe activity. Is it correct approach? 

Please suggest. 

Thanks & Regars,

Jitesh Zende