[Scriptrunner/Server] OkHttp not available

Antoine [Klee Group] February 15, 2023

Hello,

I am currently writing a Scriptrunner post-function that send data from the issue via an HTTP request to another service.

I have developped the script using the OkHttp library.

It is unfortunately not available in my client's Jira server/scriptrunner version (Scriptrunner v5.5.2 / Jira Server v7.13.2)

Is there a workaround. Either another library to use or a way to install okhttp3 on the instance?

A Jira upgrade is not currently planned, a upgrade to Jira DC is but will take place in too long therefore discarding this option on a short term.

Thanks.

2 answers

2 accepted

1 vote
Answer accepted
Antoine [Klee Group] February 15, 2023

I found this, seems like it is doing the job.

Native HTTP request by Groovy

Groovy built-in REST/HTTP client? - Stack Overflow

Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023

Good

1 vote
Answer accepted
Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2023

@Antoine [Klee Group] ,

 

You can use REST API to send the issue data. you can trigger it from post function. 

 

Thanks,

Sachin

Antoine [Klee Group] February 15, 2023

Hi @Sachin Dhamale that is exactly my question, which rest api function/library to use?

I used okhttp3 to send the rest api request but it is not available on my environment.

Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023
Like Antoine [Klee Group] likes this
Antoine [Klee Group] February 16, 2023

Thanks @Sachin Dhamale 

Suggest an answer

Log in or Sign up to answer