Want to send header in business rule - REST API

Jerry121
Kilo Contributor

Hello Everyone,

We are integrating ServiceNow through REST.

1) We are sending our incident number to that tool using rest with post method and we are getting a task number from them in response.

2) I am capturing that task id in a field on incident form.

3) Now, I have another web service where I need to send some fields from same incident form using POST method, here they I want to send these taskid in http header ( ex: content-type - taskid).

4) I am currently trying to trigger using business rule and stuck hear on http header.

Can anyone help me with this???

Thanks,

RK1229

1 ACCEPTED SOLUTION

raghavak
Giga Contributor

Yeah, Arka is right, you can use something like this



r.setRequestHeader("hearder name",current.taskid);



you can use this in your script.



Regards<


Raghava


View solution in original post

6 REPLIES 6

raghavak
Giga Contributor

Yeah, Arka is right, you can use something like this



r.setRequestHeader("hearder name",current.taskid);



you can use this in your script.



Regards<


Raghava


arka/raghava,



Can we send current captured number???



Thanks,


rk