# HttpRequest

Namespace: **Wisej.Core**

Assembly: **Wisej.Framework** (4.0.0.0)

Encapsulates HTTP-request information for an ASP.NET operation.

{% tabs %}
{% tab title="C#" %}

```csharp
public class HttpRequest
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class HttpRequest
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) HttpRequest(context, request)

Constructs an new instance [HttpRequest](https://docs.wisej.com/api/wisej.core/general/wisej.core.httprequest) initialized from the original [HttpRequest](https://docs.microsoft.com/dotnet/api/system.web.httprequest).

| Name        | Type                                                                                | Description                                                                                      |
| ----------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **context** | [HttpContext](https://docs.wisej.com/api/wisej.core/general/wisej.core.httpcontext) | The current [HttpContext](https://docs.wisej.com/api/wisej.core/general/wisej.core.httpcontext). |
| **request** | [HttpRequest](https://docs.microsoft.com/dotnet/api/system.web.httprequest)         | Original [HttpRequest](https://docs.microsoft.com/dotnet/api/system.web.httprequest) object.     |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ContentLength

[Int64](https://docs.microsoft.com/dotnet/api/system.int64): Returns the length, in bytes, of content sent by the client.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ContentType

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the MIME content type of the incoming request.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Context

[HttpContext](https://docs.wisej.com/api/wisej.core/general/wisej.core.httpcontext): Returns the current [HttpContext](https://docs.wisej.com/api/wisej.core/general/wisej.core.httpcontext).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Files

[HttpFileCollection](https://docs.wisej.com/api/wisej.core/general/wisej.core.httpfilecollection): Returns the collection of [HttpPostedFile](https://docs.wisej.com/api/wisej.core/general/wisej.core.httppostedfile) uploaded by the client.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Form

[NameValueCollection](https://docs.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection): Returns the collection of form values posted with the HTTP request.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Headers

[NameValueCollection](https://docs.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection): Returns a collection of HTTP headers.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) InputStream

[Stream](https://docs.microsoft.com/dotnet/api/system.io.stream): Returns the contents of the incoming HTTP entity body.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IsLocal

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether the request is from the local computer.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Item(key)

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the specified value from the [QueryString](#querystring) or [Form](#form) collections.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Path

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the virtual path of the current request.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) QueryString

[NameValueCollection](https://docs.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection): Returns the collection of arguments specified in the application URL.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RequestType

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the HTTP data transfer method (GET or POST) used by the client.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ServerVariables

[NameValueCollection](https://docs.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection): Returns the collection of [server variables.](https://www.w3schools.com/asp/coll_servervariables.asp).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TotalBytes

[Int64](https://docs.microsoft.com/dotnet/api/system.int64): Returns the number of bytes in the current [InputStream](#inputstream).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Url

[Uri](https://docs.microsoft.com/dotnet/api/system.uri): Returns the URL of the current request.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UrlReferrer

[Uri](https://docs.microsoft.com/dotnet/api/system.uri): Returns information about the URL of the client's previous request that linked to the current URL.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UserAgent

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the raw user agent string of the client browser.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UserHostAddress

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the IP host address of the remote client.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UserHostName

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the DNS name of the remote client.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UserLanguages

[String\[\]](https://docs.microsoft.com/dotnet/api/system.string): Returns a sorted string array of client language preferences.
