Using curl

UiKNOW's Avatar

UiKNOW

15 Jun, 2007 07:56 AM

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.

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 #2, but using a element having all the child elements shown in the API, not just and .

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!

  1. 1 Posted by UiKNOW on 22 Jun, 2007 07:24 AM

    UiKNOW's Avatar

    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.

  2. 2 Posted by UiKNOW on 22 Jun, 2007 07:24 AM

    UiKNOW's Avatar

    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.

  3. 3 Posted by UiKNOW on 22 Jun, 2007 07:26 AM

    UiKNOW's Avatar

    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.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac