RQMUrlUtility Download Attachments in Approvals
I have been able to successful download attachments using the utility if they are in the Attachments section of the test plan. However, if someone has attached files in an approval comment. It shows as an attachment, but not as an attachment object that I can get. I have to parse the approvals section in the XML and look for "service/com.ibm.rqm.planning.service.internal.rest.IAttachmentRestService". This will give me the location of the attachment. However using this URL I get a corrupted version of the attachment. If I use a web browser I can get the correct attachment.
In the documentation it speaks to using Accept Headers to get the XML representation or the content of the attachment. I am have been unable to find how to change the HTTP Accept Header for the GET request to accept the original content and not the XML representation using the RQMURLUtility.
Here is the contend from the documentation: https://jazz.net/wiki/bin/view/Main/RqmApi#ResourcesFootnote6
Attachment HTTP GET requests, when Accept header is application/xml, the HTTP response will contain the XML representation of the attachment. Otherwise, the HTTP response will contain the content of the attachment.