How to set content type in "get" task?

"Al Le" <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <trinity-397cadce-a02e-4dfc-ad7f-daad30a08be8-1458155105258@3capp-gmx-bs62>
Hello,

in our ant script, we use the "get" task to fetch some data from the server via HTTP GET. The server interprets the 'Content-Type' header of the request and delivers the response in the appropriate format (html/xml/json).

We'd like to have the result as XML and hence would need to set the content type header of the HTTP request.

Is this possible using the standard get task? If yes, how?

I've only found the 'useragent' attribute in the task but no means to set some other HTTP headers.

Thanks!
AL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.