I currently have a project converting asp classic codes to C#, then i came into this section of the code…
Function sendRequest(sRequest) //sRequest is XML data
Dim sResponse
Set oHTTP = Server.CreateObject("Microsoft.XMLHTTP")
oHTTP.open HTTP_POST, WDL_URL_PREFIX, false
oHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oHTTP.send "IN=" & Server.UrlEncode(sRequest)
sResponse = oHTTP.responseText
sendRequest = sResponse
End Function
The function basically sends XML data via HTTP and it uses Microsoft.XMLHTTP object. Now, what is the equivalent of this object(Microsoft.XMLHTTP) in .NET because I don’t want to use this legacy classic DLL…
Thanks…
In .NET, the easiest implementation there is simply:
I’m using C# here, but it applies to VB too.