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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • erxuan

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

    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.IHTMLInp utElement zipCodeQueryBox =
    FindZipCodeQuer yBox(inputEleme nts);
    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!
  • erxuan

    #2
    Re: How to find out the content of the HTTP Request when a web formis

    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_s earch&maxSearch Results=20&radi us=100&statePro vince=&stateNam e=&closestn=20& ambiguities=0&c ity=&state=&pos talCode=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.

    Comment

    Working...