2
Harvest API的以下curl請求正在生成「我們很抱歉,但出錯了」錯誤。任何想法我可能做錯了什麼?也許我沒有正確地格式化XML POST?我已經能夠使用API成功執行GET請求。我已經在下面的代碼中替換了我的特定域和用戶帳戶信息。curl POST XML和Harvest API
curl https://domain.harvestapp.com/daily/add/ -H 'Content-Type: application/xml' -H 'Accept: application/xml' -u [email protected]:password --data-urlencode "<request><notes>Test api support</notes><hours>3</hours><project_id type='integer'>1234567</project_id><task_id type='integer'>12345</task_id><spent_at type='date'>Fri, 25 Mar 2011</spent_at></request>"