I am for the first time trying to us php curl. I am trying this by creating issue in Bitbucket issue tracker.
The API documentation shows below as the end point for authenticated user:
POST https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=value&content=value"
And the curl request are said to be like this:
curl -r POST --header "Content-Length: 0" -u user:pass https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=value&content=value
I am trying with the below code:
$p = 'curl -r POST --header "Content-Length: 0" -u user:pass https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=value&content=value';
$ch = curl_init();
//execute post
$result = curl_exec($point);
//close connection
curl_close($ch);