System.Web.HttpRequest

only for RuBoard

System.Web.HttpRequest

The System.Web.HttpRequest class (or request intrinsic object) enables access to the HTTP request made by the user. A new request is created each time a user loads a page in his or her browser. Table A.9 shows the properties of the HttpRequest class, and Table A.10 shows its methods .

Table A.9. Properties of the System.Web.HttpRequest Class

Property Name

Description

AcceptTypes

Gets an array of client-supported Multipurpose Internet Mail Extensions (MIME) accept types.

ApplicationPath

Gets the path for the current application's virtual directory.

Browser

Gets a System.Web.HttpBrowserCapabilities object that represents the client browser's capabilities.

ClientCertificate

Gets the current request's client security certificate. Corresponds to server variables prefixed with CERT_ .

ContentEncoding

Gets a System.Text.Encoding object for the client browser's character set.

ContentLength

The length, in bytes, of data sent by the client. Corresponds to the CONTENT_LENGTH server variable.

ContentType

Gets the MIME type of the incoming request.

Cookies

Gets the collection of the client's cookies for the current server.

CurrentExecutionFilePath

Gets the virtual path of the current request.

FilePath

Gets the virtual path of the current request.

Files

Gets the collection of files uploaded by the client.

Filter

Gets or sets the filter to use when reading the current input stream.

Form

Gets a collection of form variables.

Headers

Gets a collection of header variables.

HttpMethod

Gets the HTTP data transfer method ( GET , POST , or HEAD ) used by the client.

InputStream

Provides access to the raw HTTP stream.

IsAuthenticated

Gets a value that indicates if the user has been authenticated for the HTTP request.

IsSecureConnection

Gets a value that indicates if the HTTP request is secure (over HTTPS). Corresponds to the HTTPS server variable.

Params

Gets a combined collection of QueryString , Form , ServerVariables , and Cookies items.

Path

Gets the virtual path of the current request. Corresponds to PATH_INFO server variable.

PathInfo

Gets additional path information for a resource.

PhysicalApplicationPath

The physical file system path of the current application's root directory. Corresponds to the APPL_PHYSICAL_PATH server variable.

PhysicalPath

Gets the physical file path associated with the requested URL.

QueryString

Gets the collection of querystring variables.

RawUrl

Gets the raw URL of the current request.

RequestType

Gets the HTTP data transfer method ( GET , POST , or HEAD ) used by the client. Corresponds to the REQUEST_METHOD server variable.

ServerVariables

Returns a collection of web server variables.

TotalBytes

Gets the number of bytes in the current input stream.

Url

Returns a System.Uri object that contains information about the URL of the current request.

UrlReferrer

Returns the URL from which this page was redirected. Corresponds to the HTTP_REFERRER server variable.

UserAgent

Gets the raw user agent string of the client browser. Corresponds to the HTTP_USER_AGENT server variable.

UserHostAddress

Gets the IP host address of the remote client. Corresponds to the REMOTE_ADDR server variable.

UserHostName

Gets the DNS name of the remote client. Corresponds to HTTP_HOST server variable.

UserLanguages

Retrieves a string array of client language preferences.

Table A.10. Methods of the System.Web.HttpRequest Class

Method Name

Description

BinaryRead

Reads a specified number of bytes from the input stream.

MapImageCoordinates

Maps an incoming image-field form parameter to appropriate X-Y coordinate values.

MapPath

Maps the specified virtual path to a physical path.

SaveAs

Saves an HTTP request to disk.

only for RuBoard


XML and ASP. NET
XML and ASP.NET
ISBN: B000H2MXOM
EAN: N/A
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net