We have Power Scripts for Confluence (SIL scripts) installed on our Confluence server. Confluence is linked to Jira with application link with Oauth impersonation.
Is is possible to use this link as authentication instead of basic authentication as explained in your example:
HttpHeader authHeader = httpBasicAuthHeader("admin", "admin");
request.headers += authHeader;
//Post data and get response
serverInfo si = httpGet("http://localhost:8080/rest/api/2/serverInfo?doHealthCheck=false", request);
Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events