Re: POST syntax for form-filling

From: Henrik Nordstrom <[email protected]>
Date: Fri, 16 Jul 1999 19:11:48 +0200

Juan Carlos Castro y Castro wrote:
>
> I'm writing an itsy-bytsy teeny weeny HTTP client which (with help of a
> nearby Squid proxy) is able to fetch any URL without even having to use
> a resolver (it's for a small device). The only thing missing is how I
> build the POST request to simulate form-filling (GET is trivial). The
> HTTP 1.0 RFC wouldn't help. Where's the authoritative info?

POST content for form submission is defined in the forms section of
RFC1866 (HTML 2.0) and any later HTML RFCs. HTTP only specifies the
message format, not the format of payload data (and POST may be used for
other actions than HTML form submission)

Anyway, the format is very simple. It is a normal HTTP message with a
Content-Length and request body (much like a reply from a HTTP server).
Content-Type should be set to "application/x-www-form-urlencoded" and
the payload data is a URL encoded representation of the FORM contents
identical to how the query string is contstructed in a GET request.

--
Henrik Nordstrom
Spare time Squid hacker
Received on Fri Jul 16 1999 - 11:45:46 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:26 MST