I've got some Python code I'm trying to convert to vb.net but I'm getting hung up. The Python code is just one line where I am talking to a controller via a web connection:
connection.request(method, str(proxy + uri), data, authHeader)
The method is "GET", the str(proxy + uri) is "/file/cfg/equipment.role?Id=20", and the data and authHeader are empty. The connection.host property is 198.80.18.1. The line of code in Python works just fine.
In Vb.net my code is:
Dim request As WebRequest = WebRequest.Create(sHRef)
request.Credentials = CredentialCache.DefaultCredentials
Dim response As WebResponse = request.GetResponse()
sHref is a string equal to "http://198.80.18.1/file/cfg/equipment.role?Id=20"
But I keep getting an error on the last line of code to get a response: "The remote server returned an error: (404) Not Found."
I feel like I'm missing something easy, but haven't figured it out yet. Anyone got a better set of eyes than me?