Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Send a POST request to an external URL from Scriptrunner

Shamanth
Contributor
December 15, 2023

Hi,

I am trying to send a POST request to an external API but it doesn't seem to work.

These are the contents to send below:

URL: "https://<url>.net"

Headers:

Authorization : Bearer <token>

Content-Type: application/x-www-form-urlencoded

Payload: No payload

The returned response would be of type JSON.

Any working piece of code would be helpful :)

1 answer

1 accepted

1 vote
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
December 15, 2023

Hi @Shamanth

For your requirement, I suggest referring to this Adaptavist Library example, which shows how to make GET, PUT, POST, and DELETE requesters to external services.

I hope this solves your question. :-)

Thank you and Kind regards,

Ram

Suggest an answer

Log in or Sign up to answer