Hi LORNAJANE,
my name is Itai I’m trying to build an app that will write an issue to JIRA using REST API,
I tried to implement it in PHP using CURL but i get an error telling me “The specified HTTP method is not allowed for the requested resource (Method Not Allowed).” can you take a look and tell me what am i doing wrong?:
[code]
<?php

$handle=curl_init();
$headers = array(
'Accept: application/json',
'Content-Type: application/json',
'Authorization: Basic YWRtaW46eWFoYWxh'
);

$data = <<‘http://localhost:8084/rest/api/2/issue/’,
CURL_POST=>true,
//CURLOPT_HTTPGET =>true,

CURLOPT_VERBOSE=>1,
CURLOPT_POSTFIELDS=>’?expand=names,renderedFields’,
CURLOPT_SSL_VERIFYHOST=> 0,
CURLOPT_SSL_VERIFYPEER=> 0,
CURLOPT_RETURNTRANSFER=>true,
CURL_HEADER=>false,
CURLOPT_HTTPHEADER=> $headers,
CURLOPT_USERPWD=>”admin:yahala”,
CURLOPT_CUSTOMREQUEST=>”POST”
)

);
$result=curl_exec($handle);
$ch_error = curl_error($handle);

if ($ch_error) {
echo “cURL Error: $ch_error”;
} else {
echo $result;
}

curl_close($handle);

?>
[/code]