Forums

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

[Scriptrunner/Server] OkHttp not available

Antoine [Klee Group]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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 Champion
February 16, 2023

Good

1 vote
Answer accepted
Sachin Dhamale
Community Champion
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]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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 Champion
February 16, 2023
Like Antoine [Klee Group] likes this
Antoine [Klee Group]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2023

Thanks @Sachin Dhamale 

Suggest an answer

Log in or Sign up to answer