# WebView2Header class
{: .no_toc }

A single HTTP header --- a name / value pair. **WebView2Header** is the element type produced by iterating a [**WebView2HeadersCollection**](/tB/Packages/WebView2/WebView2HeadersCollection.md), which in turn comes from a [**WebView2RequestHeaders**](/tB/Packages/WebView2/WebView2RequestHeaders.md) or [**WebView2ResponseHeaders**](/tB/Packages/WebView2/WebView2ResponseHeaders.md) collection.

```tb check_build
Private Sub WebView21_WebResourceRequested( _
        ByVal Request As WebView2Request, _
        ByVal Response As WebView2Response)

    Dim h As WebView2Header
    For Each h In Request.Headers
        Debug.Print h.Name & ": " & h.Value
    Next
End Sub
```

## Properties

### Name
{: .no_toc }

The header name.

Syntax: *object*.**Name** [ = *string* ]

**String**.

### Value
{: .no_toc }

The header value.

Syntax: *object*.**Value** [ = *string* ]

**String**.

## Methods

### New
{: .no_toc }

Constructs a header. Application code does not normally create headers manually --- instances are produced by the package while iterating a request- or response-header collection --- but the constructor is **Public**.

Syntax: **New WebView2Header** ( *Name*, *Value* )

*Name*
: *required* A **String** header name.

*Value*
: *required* A **String** header value.
