Question : Best Object To Use To Perform HTTPS POST

I have a vb.net (framework 3.5) solution that I am using to build a URL with appropriate query strings and perform an HTTPS POST to PHP page and get the response text back. Currently I am using the WinHttp.WinHttpRequest object (5.1), however I am having a performance issue. It somes takes as much as three 3 seconds to either declare the object (Dim), create the object, or open the connection. The open connection might be a separate firewall issue - and if anyone has thoughts on that, I'm all ears. But why would this object take so long to just create and allocate memory? Is there a better object to be using with the .NET 3.5 Framework? Or are there others I can try to test out?
Code Snippet:
1:
2:
3:
4:
5:
6:
Dim objHTTP As WinHttp.WinHttpRequest
objHTTP = CreateObject("WinHTTP.WinHTTPRequest.5.1")
objHTTP.Open("POST", myURL, False)
objHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
objHTTP.Send(myQueryStrings)
Return objHTTP.ResponseText

Answer : Best Object To Use To Perform HTTPS POST

Why not use standard .net WebClient ?
Random Solutions  
 
programming4us programming4us