eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Resources
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak

 

introduction to web programming
The POST Method  
The POST method of input was the other important change brought about by the introduction of HTTP/1.0.

The POST method allowed web browsers to send an unlimited amount of data to a web server by allowing them to tag it on to an HTTP request after the request headers as the message body.

Typically, the message body would be our old familiar encoded URL string after the question mark (?).

Thus, it would not be strange for a web server to get a POST request that looked something like the following:

    POST /cgi-bin/phone_book.cgi HTTP/1.0
    Referer: http://www.somedomain.com/Direcory/file.html
    User-Agent: Mozilla/1.22 (Windows: I: 32bit)
    Accept */*
    Content-type: application/x-www-form-urlencoded
    Content-length: 29

    name=Selena+Sol&phone=7700404

Notice that the "Content-length" request header is equal to the number of characters in the body of the request. This is important because a CGI script could easily parse through the variables in the body using the length.

Of course, as with the GET method, the user never needs to deal with the protocol itself. Instead, the browser does all the work of preparing the POST request headers and body.

So the million-dollar question is how does the browser get the name/value pairs to put into the HTTP message body?

The answer to that is HTML Forms.

Previous | Next | Table of Contents