Larry Brister
asked on
HttpWebResponse
I have a multi thread HttpWebRequest and CanRead Open response stream working.
I am asked if this can be placed in a single response stream
Since I have to make multiple posts...no way out of it...
Is there ANY way I can channel all the different WebRequest responses into a single response stream?
I am asked if this can be placed in a single response stream
Since I have to make multiple posts...no way out of it...
Is there ANY way I can channel all the different WebRequest responses into a single response stream?
ASKER
EaswaranP,
I want to make sure I've stated this correctly
I need to make a series of posts in HTTP Web Request.
How do I do that (using your example) when I'm doing this in each thread right now...
I'm removing a bit of that header information...not needed)
I want to make sure I've stated this correctly
I need to make a series of posts in HTTP Web Request.
How do I do that (using your example) when I'm doing this in each thread right now...
I'm removing a bit of that header information...not needed)
Dim sendWebRequest As HttpWebRequest = CType(WebRequest.Create(stUrl), HttpWebRequest)
'Following items
sendWebRequest.SendChunked = True
sendWebRequest.Method = "POST"
sendWebRequest.ContentType = "text/plain"
sendWebRequest.KeepAlive = True
sendWebRequest.UserAgent = "CometTest"
sendWebRequest.ServicePoint.ConnectionLimit = 20
sendWebRequest.Timeout = 43200
sendWebRequest.ReadWriteTimeout = System.Threading.Timeout.Infinite
Dim encodedData As New ASCIIEncoding()
Dim byteArray As Byte() = encodedData.GetBytes(sendRow)
sendWebRequest.ContentLength = byteArray.Length
Dim newStream As Stream = sendWebRequest.GetRequestStream()
newStream.Write(byteArray, 0, byteArray.Length)
newStream.Close()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
After quite a bit of research I agree.
Just had to validate with my manager
Just had to validate with my manager
Open in new window
Please do refer below links for more information:
http://forums.asp.net/t/1779147.aspx/1
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx
http://www.dotnetperls.com/streamreader