Alternative to HttpWebRequest for posting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Are there any alternatives to HttpWebRequest for posting?
I think using the HttpWebRequest for the "multipart/form" will require quite
an amount of code.

I would rather like something similar to:
HttpWebPost post = new HttpWebPost("http://somehere.over.the/rainbow");
post.setEncodingType(EncodingTypes.multipart);
post.addParameter("username", "Mr Test");
post.addParameter("password", "secret");
HttpWebResponse response = post.GetResponse();

The HttpClient java library is an excellent java-version of a this kind of
library.
 
Thus wrote Bais,
Are there any alternatives to HttpWebRequest for posting?
I think using the HttpWebRequest for the "multipart/form" will require
quite
an amount of code.
I would rather like something similar to:
HttpWebPost post = new
HttpWebPost("http://somehere.over.the/rainbow");
post.setEncodingType(EncodingTypes.multipart);
post.addParameter("username", "Mr Test");
post.addParameter("password", "secret");
HttpWebResponse response = post.GetResponse();
The HttpClient java library is an excellent java-version of a this
kind of library.

WebClient has the UploadFile() method, which implements multipart/form-data,
though it's not as powerful as a full HttpClient port would be.

Cheers,
 
Back
Top