AFAIK with XmlHttpRequest I can only upload and download data using the send method. But WebClient has many methods. I do not need all the features of WebClient . I just want to create an object that emulates an XmlHttpRequest , except that it has no XSS restrictions. I also do not want to receive the answer as XML or even as a string right now. If I can get it as an array of bytes, which is good enough.
I thought I could use UploadData as my universal method, but it fails when trying to upload data with it, even if it returns a response. So, how can I write a method that behaves like the XmlHttpRequest send method?
Edit: I found an incomplete class, which is exactly the XmlHttpRequest emulator here . Too bad that all the code is lost.
source share