How do you update workitems using Perl LWP UserAgent?
I've been trying to post a new workitem to my RTC server then try to use a PUT to update the state of the workitem. So far, I only get a 406 not acceptable error. Here's a section of the code I'm running:
|
One answer
You cannot modify the state of work item directly using OSLC (via PUT). You have to invoke an "action" to change the state, just like you do on the Web UI. Some discussions in the past may help you a bit.
Comments I made these changes to my code to use the action but it still gave me a 406 not acceptable error response:
Donald Nong
commented Apr 11 '18, 9:37 p.m.
HTTP 406 basically means that the application does not accept the value of the "Accept" header. Try with "/" or "application/xml" instead.
Shawn Carroll
commented Apr 12 '18, 10:29 a.m.
I've tried both of those along with application/rdf+xml and application/x-oslc-cm-change-request+xml. Everything comes back error 406.
Donald Nong
commented Apr 13 '18, 6:16 a.m.
Oh...you are calling the action directly, and you may try "application/json", which is the only accepted format for some internal APIs.
Shawn Carroll
commented Apr 13 '18, 9:51 a.m.
I got the same result as the others with application/json.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.