Unsupported media type error while creating a work item in JazzHub using OSLC REST APIs
I am attempting to create a work item in Bluemix's Track & Plan or JazzHub using OSLC REST APIs. Here's my curl command:
curl -X POST https://hub.jazz.net/ccm34/oslc/contexts/_ydaKxAtiEeao2prjBQrN8g/workitems -H "Accept:application/x-oslc-cm-change-request+json" -L -i -H "OSLC-Core-Version:2.0" -u"name:password" -d '{"dc:title":"test curl title", "dc:description":"test curl summary", "dc:type":{"rdf:resource":"https://hub.jazz.net/ccm34/oslc/types/_ydaKxAtiEeao2prjBQrN8g/task"},"rtc_cm:filedAgainst":{"rdf:resource":"Unassigned"}}'
I am following the guidelines to make the accept header to be of type 'application/x-oslc-cm-change-request+json'. My response shows up as this (see below). Tried both xml as well as application/json and did not work. Any idea why this POST request is failing? Also tried setting the content-type header and got the same error.
HTTP/1.1 415 Unsupported Media Type Date: Fri, 06 May 2016 22:14:20 GMT Server: Apache X-Powered-By: Servlet/3.0 Expires: Fri, 06 May 2016 22:14:21 GMT Content-Language: en-US Content-Length: 0 Cache-Control: private, must-revalidate, max-age=0, no-cache=set-cookie Set-Cookie: ....