Freigeben über


Request Object

The Request object retrieves the values that the client browser passed to the server during an HTTP request.

Methods

The Request object defines the following method.

Method

Description

Request.BinaryRead

Retrieves data sent to the server from the client as part of a POST request.

Properties

The Request object defines the following properties.

Property

Description

Request.ClientCertificate Collection

The values of fields stored in the client certificate that is sent in the HTTP request.

Request.Cookies Collection

The values of cookies sent in the HTTP request.

Request.Form Collection

The values of form elements in the HTTP request body.

Request.QueryString Collection

The values of variables in the HTTP query string.

Request.ServerVariables Collection

The values of predetermined environment variables.

Request.TotalBytes

Read-only; specifies the total number of bytes the client is sending in the body of the request.

Remarks

If the specified variable is not in one of the preceding five collections, the Request object returns EMPTY.

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

  • ServerVariables

If a variable with the same name exists in more than one collection, the Request object returns the first instance that the object encounters.

It is strongly recommended that when referring to members of a collection the full name be used. For example, rather than Request.("AUTH_USER") use Request.ServerVariables("AUTH_USER"). This allows the server to locate the item more quickly.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also