Larry Brister
asked on
HttpWebRequest
I feel stupid for asking...
Is there any way to do a "phased POST" on an HttpWebRequest?
In my code below
Without opening another connection
can the Dim newStream As Stream = sendWebRequest.GetRequestS tream() be done in pieces?
Here's my code that works.
Is there any way to do a "phased POST" on an HttpWebRequest?
In my code below
Without opening another connection
can the Dim newStream As Stream = sendWebRequest.GetRequestS
Here's my code that works.
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
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
I have a POST of XML I'm sending to the HttpWebRequest
It looks like
<command><id>1</id></comma nd>
<command><id>2</id></comma nd>
<command><id>3</id></comma nd>
<command><id>4</id></comma nd>
<command><id>5</id></comma nd>
<command><id>6</id></comma nd>
<command><id>7</id></comma nd>
<command><id>8</id></comma nd>
So I want to "Open a Post???"
send first 4
pause 1000 milli seconds with a sleep
send the other 4
Complete the post.
I THINK this is a dumb question...
Just not experienced enough with the POST part to know.
It looks like
<command><id>1</id></comma
<command><id>2</id></comma
<command><id>3</id></comma
<command><id>4</id></comma
<command><id>5</id></comma
<command><id>6</id></comma
<command><id>7</id></comma
<command><id>8</id></comma
So I want to "Open a Post???"
send first 4
pause 1000 milli seconds with a sleep
send the other 4
Complete the post.
I THINK this is a dumb question...
Just not experienced enough with the POST part to know.
After you've done the first post would not the server then think that you've finished and not know what to do with the remaining posts?
ASKER
ve3ofa
That's what I keep trying to say.
As I mentioned above..
This is not my area of expertise.
So that's why I'm asking if there is a "threaded" post
That's what I keep trying to say.
As I mentioned above..
This is not my area of expertise.
So that's why I'm asking if there is a "threaded" post
the only thing that comes to mind is the http keep-alive which is turned on by default and allows http requests to reuse TCP connections. Codewise there's no really such thing as to "open a post". That being said, why don't you use more than one xml command in a single post?
ASKER
lenordiste
Not sure that would work
In my list above I'm currently posting 4 at a time in separate threaded posts.
On the VENDOR end...
They only allow (x) numbers in the "waiting" status on the post at a time.
In any event...
How could I send more that one xml command at a time?
Not sure that would work
In my list above I'm currently posting 4 at a time in separate threaded posts.
On the VENDOR end...
They only allow (x) numbers in the "waiting" status on the post at a time.
In any event...
How could I send more that one xml command at a time?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
http://msdn.microsoft.com/
if not, what are you trying to accomplish :) ?