tag:help.lighthouseapp.com,2008-09-20:/discussions/api-developers/4-using-curlLighthouse: Discussion 2011-10-13T02:02:00Ztag:help.lighthouseapp.com,2008-09-20:Comment/102182007-06-15T07:56:04Z2009-06-20T20:56:50ZUsing curl<div><p>Hey guys. Warning: This is a noob question. I can't get curl to
work. I'm just trying to post a new ticket to my project.</p>
<p>I've tried the commands 1) curl -H 'X-LighthouseToken:
(mytoken)' -d 'body=bar&title=foo'
http://myproject.lighthouseapp.com/projects/myprojectid-myprojectname/tickets.xml
2) curl -H 'X-LighthouseToken: (mytoken)' -d 'barfoo'
http://myproject.lighthouseapp.com/projects/myprojectid-myprojectname/tickets.xml
and also 3) just like <a href="/discussions/api-developers/2"
title="Discussion #2">#2</a>, but using a element having all the
child elements shown in the API, not just and .</p>
<p>LightHouse returns an element saying that the 1) Title, 2)
Creator, and 3) User can't be blank. I think I'm not using curl
correctly, otherwise it wouldn't complain about the ticket title.
Can someone straighten me out? Thanks!</p></div>UiKNOWtag:help.lighthouseapp.com,2008-09-20:Comment/102182007-06-22T07:24:35Z2009-06-20T20:56:50ZUsing curl<div><p>I just needed to add the Content-Type header to my request. (-H
'Content-Type: application/xml'). Rick, if you would add a note
about this in the prelim docs, I think users would find it useful.
Also, perhaps an HTTP 406 Unacceptable would be an appropriate
server response for requests without Content-Type? Thanks.</p></div>UiKNOWtag:help.lighthouseapp.com,2008-09-20:Comment/102182007-06-22T07:24:45Z2009-06-20T20:56:50ZUsing curl<div><p>I just needed to add the Content-Type header to my request. (-H
'Content-Type: application/xml'). Rick, if you would add a note
about this in the prelim docs, I think users would find it useful.
Also, perhaps an HTTP 406 Unacceptable would be an appropriate
server response for requests without Content-Type? Thanks.</p></div>UiKNOWtag:help.lighthouseapp.com,2008-09-20:Comment/102182007-06-22T07:26:35Z2009-06-20T20:56:50ZUsing curl<div><p>My post came up twice because-- the first time I posted, Beast
told me there was an error and gave me the impression that my post
didn't actually get through. Beast didn't describe the error, and I
posted again.</p></div>UiKNOW