[Next] [Up] [Previous]
Next: HTTP/1.0 Response Up: HTTP/1.0 Methods Previous: The HEAD method

The POST method

The POST method is used to transfer data from the client to the server; it's designed to allow a uniform method to cover functions like: annotation of existing resources; posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; providing a block of data (usually a form) to a data-handling process; extending a database through an append operation.
POST /~hy556/cgi-bin/post-query HTTP/1.0
Accept: text/html,video/mpeg,image/gif,application/postscript
User-Agent: Lynx/2.8.4 libwww/5.4.0
From: giannak@csd.uoc.gr
Content-Type: application/x-www-form-urlencoded
Content-Length: 150
** a blank line *
org=Distributed%20Systems&professor=Marazakis&browsers=lynx
This is a "POST" query addressed for the program residing in the file at "/~hy556/cgi-bin/post-query", that simply echoes the values it receives. The client lists the MIME-types it is capable of accepting, and identifies itself and the version of the WWW library it is using. Finally, it indicates the MIME-type it has used to encode the data it is sending, the number of character included, and the list of variables and their values it has collected from the user. MIME-type "application/x-www-form-urlencoded" means that the variable name-value pairs will be encoded the same way a URL is encoded. Any special characters, including puctuation, will be encoded as nn where nn is the ASCII value for the character in hex.
[Next] [Up] [Previous]
Next: HTTP/1.0 Response Up: HTTP/1.0 Methods Previous: The HEAD method
Copyright © 2003, John Yannakopoulos <giannak@csd.uoc.gr>