Question Async POST with httpwebrequests

xGhost

Member
Joined
Feb 8, 2010
Messages
21
Programming Experience
1-3
I understand to do async GETS with httpwebrequests, but I still have some problems in doing multiple async posts (whom are multithreaded/parallel).

Would it be possible to post a small example? Thanks in advance.
What I need to do is:
- do a post to a host
- read the returned result (html)
 
The difference between GET and POST is basically just setting the Method property of the request. For HttpWebRequest Methods (System.Net) the async versions of GetRequestStream and GetResponse is the Begin/End... methods of same name, there are sample codes for both in documentation.
This article How to: Send Data Using the WebRequest Class explains a basic POST with synchronous calls, to change it to async Begin-/End- should be much of a problem. Compare with the documentation samples.
 
Back
Top