[plt-scheme] question about HTTP POST with post-impure-port/post-pure-port

From: Chognkai Zhu (czhu at cs.utah.edu)
Date: Fri Feb 12 18:13:21 EST 2010


Here is a from from some website:

      <form name="ua" action="/" method="post">
      <input type="hidden" name="redirect" value="/?dnode=State">


        <tr align="left" valign="middle" bgcolor="#ffffff">
          <td><B>Username:</B><BR><input name="username" type="text" 
          <td><B>Password:</B><BR><input name="password" type="password" 
          <td valign="bottom"><input type="submit" value="Login"></td>
          <td colspan="2">
            <p style="font-size: 12pt; margin-top: 10px;">
              <a href="/?dnode=pass">Forget your password?</a>

I need a program to submit this form. I tried

   (string->url "http://XXXX/?redirect=%2F%3Fdnode%3DState")

Where XXXX is either the host(url) or the username/password(in URL 
encoding). But it doesn't seems to work. The returned page is still the 
page with the form asking for username/password. What part did I miss? 
Could anyone who know these things please help? Many thanks.


Posted on the users mailing list.