The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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