# httpForcedVersion

> Force the version of HTTP used when making web requests with UnityWebRequest.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.Networking](/engine/6000.5/script-reference/unityengine/networking.md)
* **Assembly:** UnityEngine.UnityWebRequestModule

```csharp
public HttpForcedVersion httpForcedVersion { get; set; }
```

### Remarks

Setting this property to `HttpForcedVersion.NotForced` causes [UnityWebRequest](/engine/6000.5/script-reference/unityengine/networking/unitywebrequest.md) to use standard negotiation with the server to determine which HTTP version to use.

Using other values causes [UnityWebRequest](/engine/6000.5/script-reference/unityengine/networking/unitywebrequest.md) to force the web requests to a particular version of HTTP even if insecure HTTP is being used.

*Default value:* `HttpForcedVersion.NotForced`.

Refer to [HttpForcedVersion](/engine/6000.5/script-reference/unityengine/networking/httpforcedversion.md) for more information.

```csharp
using UnityEngine.Networking;

public class HttpForcedVersionExample
{
    public static UnityEngine.Networking.UnityWebRequest MakeUnityWebRequestWithForcedHttp2()
    {
        var httpHandler = new UnityEngine.Networking.UnityWebRequest()
        {
            httpForcedVersion = HttpForcedVersion.HTTP2
        };
        return httpHandler;
    }
}
```

Demonstrating how to force web requests to HTTP/2 using `UnityWebRequest`.
