# Google.Cloud.Logging.Type - Class HttpRequest (4.3.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.3.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type.HttpRequest)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/4.2.0/Google.Cloud.Logging.Type.HttpRequest)
- [4.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/4.1.0/Google.Cloud.Logging.Type.HttpRequest)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/4.0.0/Google.Cloud.Logging.Type.HttpRequest)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/3.5.0/Google.Cloud.Logging.Type.HttpRequest)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/3.4.0/Google.Cloud.Logging.Type.HttpRequest)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/3.3.0/Google.Cloud.Logging.Type.HttpRequest)

    public sealed class HttpRequest : IMessage<HttpRequest>, IEquatable<HttpRequest>, IDeepCloneable<HttpRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Google.Cloud.Logging.Type class HttpRequest.

A common proto for logging HTTP requests. Only contains semantics
defined by the HTTP specification. Product-specific logging
information MUST be defined in a separate message.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> HttpRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[HttpRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type.HttpRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[HttpRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type.HttpRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[HttpRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type.HttpRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Logging.Type](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type)

## Assembly

Google.Cloud.Logging.Type.dll

## Constructors

### HttpRequest()

    public HttpRequest()

### HttpRequest(HttpRequest)

    public HttpRequest(HttpRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Type/latest/Google.Cloud.Logging.Type.HttpRequest` |

## Properties

### CacheFillBytes

    public long CacheFillBytes { get; set; }

The number of HTTP response bytes inserted into cache. Set only when a
cache fill was attempted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### CacheHit

    public bool CacheHit { get; set; }

Whether or not an entity was served from cache
(with or without validation).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CacheLookup

    public bool CacheLookup { get; set; }

Whether or not a cache lookup was attempted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CacheValidatedWithOriginServer

    public bool CacheValidatedWithOriginServer { get; set; }

Whether or not the response was validated with the origin server before
being served from cache. This field is only meaningful if `cache_hit` is
True.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Latency

    public Duration Latency { get; set; }

The request processing latency on the server, from the time the request was
received until the response was sent.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### Protocol

    public string Protocol { get; set; }

Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Referer

    public string Referer { get; set; }

The referer URL of the request, as defined in
[HTTP/1.1 Header Field
Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RemoteIp

    public string RemoteIp { get; set; }

The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. This field can include port information. Examples:
`"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RequestMethod

    public string RequestMethod { get; set; }

The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RequestSize

    public long RequestSize { get; set; }

The size of the HTTP request message in bytes, including the request
headers and the request body.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### RequestUrl

    public string RequestUrl { get; set; }

The scheme (http, https), the host name, the path and the query
portion of the URL that was requested.
Example: `"http://example.com/some/info?color=red"`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ResponseSize

    public long ResponseSize { get; set; }

The size of the HTTP response message sent back to the client, in bytes,
including the response headers and the response body.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### ServerIp

    public string ServerIp { get; set; }

The IP address (IPv4 or IPv6) of the origin server that the request was
sent to. This field can include port information. Examples:
`"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Status

    public int Status { get; set; }

The response code indicating the status of response.
Examples: 200, 404.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### UserAgent

    public string UserAgent { get; set; }

The user agent sent by the client. Example:
`"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
CLR 1.0.3705)"`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |