ASP » Objects » Request

The Request object provides access to all of the information that is passed in a request from the browser to the server.

This information is stored among five types of Request collections. A collection is similar to a data structure or array. Individual items in the collection are accessed via a unique key assigned to that item. All variables can be accessed directly by calling Request(variable) without the collection name. In this case, the Web server searches the collections in the following order: QueryString, Form, Cookies, ClientCertificate, then ServerVariables.

Properties

TotalBytes

Syntax: Request.TotalBytes

The TotalBytes property specifies the total number of bytes sent in the body of the HTTP request.

Methods

BinaryRead

Syntax: Request.BinaryRead(Count)

The BinaryRead method retrieves the data that was sent to the server from the browser as part of a POST request, and returns the number of bytes read.

Collections

ClientCertificate

Syntax: Request.ClientCertificate(Key [SubField])

The ClientCertificate collection property contains the values of the client certification fields of the request.

Cookies

Syntax: Request.Cookies(Name)[(Key)|.Attribute]

The Cookies collection property contains the values of the cookies sent in the request.

Form

Syntax: Request.Form(Element)[(Index)|.Count]

The Form collection property contains the values of the <FORM> elements posted to a form using the POST method.

QueryString

Syntax: Request.QueryString (Variable)[(Index)|.Count]

The QueryString collection property contains the values of the variables in the HTTP query string, which are the statements that follow a question mark.

ServerVariables

Syntax: Request. ServerVariables (EnvironmentVariable)

The ServerVariables collection property contains the values of server environmental variables. This allows access to the HTTP headers.