---
title: HeaderValue
summary: Represents a single HTTP header value.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/class.HeaderValue/
---

**Kind:** Class  
**Module:** [http](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L15

Include `fastly/http/header.h` to use this class.

Represents a single HTTP header value.

## Constructor

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L17

```cpp
fastly::http::HeaderValue::HeaderValue(std::string value, bool is_sensitive = false)
```

**Parameters**

- `value`: `std::string`
- `is_sensitive`: `bool` (optional) = `false`

## Methods

### bytes

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L27

```cpp
std::span<const uint8_t> fastly::http::HeaderValue::bytes() const
```

**Returns**

`std::span<const uint8_t>`

### has_non_visible_characters

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L39

```cpp
bool fastly::http::HeaderValue::has_non_visible_characters() const
```

**Returns**

`bool`

### is_sensitive

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L32

```cpp
bool fastly::http::HeaderValue::is_sensitive() const
```

**Returns**

`bool`

### set_sensitive

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L34

```cpp
bool fastly::http::HeaderValue::set_sensitive(bool sensitive)
```

**Parameters**

- `sensitive`: `bool`

**Returns**

`bool`

### string

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/header.h#L20

```cpp
std::optional<std::string_view> fastly::http::HeaderValue::string() const
```

**Returns**

`std::optional<std::string_view>`
