How to find out the content of the HTTP Request when a web form isautomaically submitted?

E

erxuan

Hi,
I'm writing a program what given a homepage url, it can automatically
navigate to the page that contains the query form, fill the form and
submit it.

mshtml.IHTMLInputElement zipCodeQueryBox =
FindZipCodeQueryBox(inputElements);
zipCodeQueryBox.value = "60616";
zipCodeQueryBox.form.submit();

Now I'm trying to figure out after zipCodeQueryBox.form.submit(); is
called, what the content (post data) of the HTTP Request is sent out
to the server?
Is there an easy way to get this piece of information?

Thanks!
 
E

erxuan

I think I cannot use HttpWebRequest unless I know the format of
postData. (maybe I'm wrong)
My ultimate goal is, by submitting the form, AUTOMATICALLY figure out
the format of postData, and then generate many new HttpWebRequest by
replacing the value in postData.

For example, if postData=
"template=map_search&maxSearchResults=20&radius=100&stateProvince=&stateName=&closestn=20&ambiguities=0&city=&state=&postalCode=60616",
how can I automatically get this information after submitting the
form?

I know Fiddler can do it, but I don't know how to use its API to do it
in code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top