0
如果我使用curl命令向github api發出POST請求以添加「Resolved」標籤;事情很好。寫一個捲曲在Ruby中發送郵件
curl -i -H "Authorization: token xxxxxxxxxxxx" -X POST 'https://git.corp.yahoo.com/api/v3/repos/owner/repo/issues/1/labels' -d '["Resolved"]'}
但是,當我嘗試做使用curl容易同在我的Ruby腳本
set gh_api = https://git.corp.yahoo.com/api/v3/repos/owner/repo/issues/1/labels
curl = Curl::Easy.http_post(settings.gh_api,'["Resolved"]')
do |c|
c.headers = ["Authorization: token xxxxxxxx"]
end
的JSON效應初探我得到的是
"{\"message\":\"Not Found\"}"
我在做什麼錯在我的紅寶石腳本?
你的問題是? – 2013-04-30 19:17:39
@TheTinMan編輯我的問題,使其更清晰。這有意義嗎? – Praveen 2013-04-30 19:20:49