You are on page 1of 1

4 Part I Fundamentals

Important To install the code samples for this book, you must have Administrator rights on
your computer. If you are using your own computer, you probably have Administrator rights. If
you are using a computer in an organization and you do not have Administrator rights, please
consult your computer support or IT staff. See the Code Samples section in the Introduction for
more information.
Important The code samples for this chapter on the companion CD require IIS support to
execute. See the Code Samples section in the Introduction for important information on
running the examples for this chapter.
HTTP Requests
The communication mechanism with which Web browsers talk to Web sites is named
Hypertext Transfer Protocol (HTTP). The World Wide Web as we know it today began as a
research project at CERN in Switzerland. In those days, the notion of hypertext documents
linked together arbitrarilywas becoming increasingly popular. Applications such as
Hypercard from Apple Computer introduced hypertext applications to a wider audience. If
documents could then be linked over a network, that would revolutionize publishing. Thats
the reason for the development of HTTP, which lies on top of TCP/IP as an application layer.
In its original form, HTTP was meant to transfer hypertext documents. That is, it was
originally intended simply to link documents together without consideration for anything like
the Web-based user interfaces that are the staple of modern Web sites. The earliest versions
of HTTP supported a single GET request to fetch the named resource. It then was the servers
job to send the le as a stream of text. After the response arrived at the clients browser, the
connection terminated. The earliest versions of HTTP supported only transfer of text streams
and did not support any other sort of data transfer.
The rst formal specication for HTTP was version 1.0 and was published in the mid-1990s.
HTTP 1.0 added support for more complex messaging beyond a simple text transfer pro-
tocol. HTTP grew to support different media (specied by the Multipurpose Internet Mail
Extensions). The current version of HTTP is version 1.1.
As a connection protocol, HTTP is built around several basic commands. The most important
ones you see in developing ASP.NET applications are GET and POST, but other important
HTTP commands not as commonly used within ASP.NET include HEAD and PUT.
GET retrieves the information identied by the Uniform Resource Identier (URI) specied
by the request. The HEAD command retrieves only the header information identied by the
URI specied by the request (that is, it does not return a message body). You use the POST
method to make a request to the server that might cause side effects, such as when you send
information to the server for it to process. PUT is also used to send information to the server,