I am trying to create a uri get with custom headers, the site is suppsoe to return xml back for the request. I have tried the following code and I get nothing back:
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim reader As StreamReader
Dim result As String
' Create the web request
request = DirectCast(WebRequest.Crea
request.Method = "GET"
request.ContentType = "text/xml"
'request.KeepAlive = False
' Get response
response = DirectCast(request.GetResp
' Get the response stream into a reader
reader = New StreamReader(response.GetR
' Read the whole contents and return as a string
result = reader.ReadToEnd()
If response IsNot Nothing Then response.Close()
This is returning a 406 error and should be returning xml data. I have used the REST client plugin for firefox with my values and verified that I should be getting xml back.