HTTPWebRequest for XML containing an XSLT
-
19-08-2019 - |
Question
I'm using the HttpWebRequest
object to make a get call to a site/web service that uses XML/XSLT as its front end. When I view the source in Firefox the XML comes up, but when I make the request in my program the transformed document is returned to me.
As the transformed document is very useless to me, how can I make the request and get the straight XML back?
Solution
Not a problem on my end. Basically, the host that I'm requesting from requires a real browser's UserAgent in order for the xml to come back. Seems to me like it would be better left for ContentType or Accepts header fields, but whatever.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow