I have an object created called objM_message.
I want to serialize it as xml and place the xml in my
HttpWebRequest.GetRequestStream.
But the line resp = req.GetResponse
doesnt return any results .. it should do
My question is this. Is the WriteTo() method the proper one to use to
pass the contents of my memory stream into the
req.GetRequestStream
Graham
-----------------------------------------------------------
Dim memStream As New MemoryStream
serializeAPP.Serialize(memStream, objM_message)
memStream.Position = 0
Dim req As HttpWebRequest = WebRequest.Create("myURL")
Dim resp As HttpWebResponse
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"
req.ContentLength = memStream.Length
'================================================= ======
' Attempt to write XML in my XML obj to Request Stream
'================================================= ======
Try
memStream.WriteTo(req.GetRequestStream)
memStream.Flush()
memStream.Close()
Catch e1 As Exception
Console.Write("Error in request stream")
End Try
'================================================= ======
' Send down the request and get the response back
'================================================= ======
resp = req.GetResponse
-----------------------------------------------------------
*** Sent via Developersdex http://www.developersdex.com ***