HTTPS Post

  • Thread starter Thread starter Mike Fellows
  • Start date Start date
M

Mike Fellows

I currently use the following to post xml files to a server


Dim strURL As String = "http://www.myserver.com/response.asp"
Dim requestStream As IO.Stream = Nothing
Dim fileStream As IO.FileStream = Nothing
Dim uploadResponse As Net.HttpWebResponse = Nothing
Dim uploadRequest As Net.HttpWebRequest = Net.WebRequest.Create(strURL)

uploadRequest.Method = Net.WebRequestMethods.Http.Post
uploadRequest.Proxy = Nothing

requestStream = uploadRequest.GetRequestStream()

Dim buffer(1024) As Byte
Dim bytesRead As Integer
While True
bytesRead = fileStream.Read(buffer, 0, buffer.Length)
If bytesRead = 0 Then
Exit While
End If
requestStream.Write(buffer, 0, bytesRead)
End While

requestStream.Close()
uploadResponse = uploadRequest.GetResponse()


however I need to change this to HTTPS but cant find any documentation
other than 3rd party .net libraries

I'm completely stuck

Thanks

Mike Fellows
 
Back
Top