Java & REST API question
I am writing a Java program which will get the xml of a workitem. After authentication when I try to get the work item (https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/99.xml)
and I always get the user info in json format as descried here
https://jazz.net/forum/questions/64839/httpslocalhost9443jtsprocessproject-areas
I am using http client 4.3.3
I am able to get xml using curl as well as REST client for Firefox
Anyone has any idea why I get my user info in json format?
Accepted answer
Karthik
There are Java samples in the OSLC workshop https://jazz.net/library/article/635
There are Java samples in the OSLC workshop https://jazz.net/library/article/635
Comments
Canberk Akduygu
Apr 30 '14, 10:10 a.m.Which headers are you including to your rest call?
Accept = application/xml or aaplication/json
I also see that you add .xml at the end of your url. You dont need to do that.
Karthik Krishnan
Apr 30 '14, 10:18 a.m.I already have it