|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Alternative to HttpWebRequest for postingAre 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? WebClient has the UploadFile() method, which implements multipart/form-data, > 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. though it's not as powerful as a full HttpClient port would be. Cheers, -- Joerg Jooss news-re***@joergjooss.de |
|||||||||||||||||||||||