1
我第一次嘗試使用php curl。我嘗試通過在Bitbucket問題跟蹤器中創建問題。使用捲曲的帖子
API文檔下面顯示爲終點的身份驗證的用戶:
POST https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=value&content=value"
而捲曲的請求被說成是這樣的:
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
我想用以下代碼:
$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);
要哪一個環節要發佈?以及要發佈哪些數據? –