Skip to main content

Perl

use warnings;use IO::Socket::SSL;use HTTP::Request ();use LWP::UserAgent ();use JSON::MaybeXS qw(encode_json);my $url = '<YOURTRIGGERURL>';my $header = [    'Content-Type' => 'application/json; charset=UTF-8',    'Accept' => 'application/json',    'apiKey'=>'<YOURTOKEN>'];my $data = {    options => {        method => 'GET',        headers => { 'Content-Type'=> 'application/json', Accept => 'application/json'}},        url => '/rest/api/3/issue/DEV-16'    };my $encoded_data = encode_json($data);my $request = HTTP::Request->new('POST', $url, $header, $encoded_data);my $ua = LWP::UserAgent->new;my $response = $ua->request($request);my $res = $response->content;print "r : ${res}";