JSON doesn't PUT data
When working with updating an individual ticket it does't appear that the API is accepting the new data.
Create the new ticket data:
{
ticket = {
"body_html" = "some html body";
priority = 1;
"priority_name" = High;
state = open;
};
}
Response
{
"Cache-Control" = "no-cache";
Connection = close;
"Content-Length" = 1;
"Content-Type" = "application/json; charset=utf-8";
Date = "Tue, 14 Jun 2011 17:41:46 GMT";
Server = "nginx/0.7.65";
"Set-Cookie" = "_lighthouse_session=BAh7BzoPc2Vzc2lvbl9pZCIlYWEwN2NiZTY3MTdmNDg5M2UwZWRkMGYxM2RkYzY5Y2M6CXVzZXJpA%2BMfAQ%3D%3D--85cc13206844d90e5e5123f1124ae49fa2757909; path=/; HttpOnly";
Status = "200 OK";
"X-Runtime" = 59;
}
The tickets last updated time stamp is updated but the ticket doesn't reflect any of the requested changes.
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
1 Posted by Joe Keeley on 15 Jun, 2011 05:02 PM
Discovered the solution to this: make sure to include the following headers in the PUT request so that the server can understand the request is JSON:
"Content-Type"="application/json" "Accepts"="application/json"
This would be really helpful to have added to the docs!
2 Posted by Kyle Richter on 15 Jun, 2011 05:04 PM
Joes note does resolve the problem I am having, this would be a good doc addition.
Kyle Richter closed this discussion on 15 Jun, 2011 05:04 PM.