Hey all,
Below is a snippet of PERL code I'm using to try and create an issue in Jira, and it doesn't seem to be working. What am I missing? (username and password not defined in example):
---
use LWP::UserAgent;
use HTTP::Request::Common;
my $browser = LWP::UserAgent->new;
my $url = 'http://jira.tmx.com/rest/api/2/issue/';
my $json = '{ "fields": { "project": { "id": "10073" }, "summary": "No REST for the Wicked.", "description": "Creating of an issue using ids for projects and issue types using the REST API", "issuetype": { "id": "18" } } }';
my $req = HTTP::Request->new( 'POST', $url );
$req->authorization_basic($userid, $userpwd);
$req->header( 'Content-Type' => 'application/json' );
$req->content( $json );
$browser->request($req);
---