webclient class usage

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

Guest

Hello,

I'm trying to input data into a web page and read the response page. This is
easy enough with the webbrowser class but I cant get it to work with the
webclient class. I've tried all the UploadValues, UploadData methods etc but
they all seem to just reload the input page. How do I get the response page?
 
Thus wrote FutDev,
Hello,

I'm trying to input data into a web page and read the response page.
This is easy enough with the webbrowser class but I cant get it to
work with the webclient class. I've tried all the UploadValues,
UploadData methods etc but they all seem to just reload the input
page. How do I get the response page?

The web site probably requires cookies or checks the User-Agent header, none
of which are present if you use a bare bones WebClient instance. Try adding
potentially required HTTP headers -- you can use a tool like Fiddler to analyze
the HTTP traffic.

Cheers,
 
Back
Top