# Message

<a id="message-1"></a>

# Message

```cpp
#include <icy/http/message.h>

class Message
```

[Defined in src/http/include/icy/http/message.h:28](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L28)

> **Inherits:** [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection)
> **Subclassed by:** [`Request`](https://auscaster.com/icey/docs/api-reference/icy-http-Request.md#request-6), [`Response`](https://auscaster.com/icey/docs/api-reference/icy-http-Response.md#response-3)

The base class for [Request](https://auscaster.com/icey/docs/api-reference/icy-http-Request.md#request-6) and [Response](https://auscaster.com/icey/docs/api-reference/icy-http-Response.md#response-3).

Defines the common properties of all HTTP messages. These are version, content length, content type and transfer encoding.

## List of all members

| Name | Kind | Owner |
|------|------|-------|
| [`setVersion`](#setversion-1) | `function` | Declared here |
| [`getVersion`](#getversion-1) | `function` | Declared here |
| [`setContentLength`](#setcontentlength) | `function` | Declared here |
| [`getContentLength`](#getcontentlength) | `function` | Declared here |
| [`hasContentLength`](#hascontentlength) | `function` | Declared here |
| [`setTransferEncoding`](#settransferencoding) | `function` | Declared here |
| [`getTransferEncoding`](#gettransferencoding) | `function` | Declared here |
| [`setChunkedTransferEncoding`](#setchunkedtransferencoding) | `function` | Declared here |
| [`isChunkedTransferEncoding`](#ischunkedtransferencoding) | `function` | Declared here |
| [`setContentType`](#setcontenttype) | `function` | Declared here |
| [`getContentType`](#getcontenttype) | `function` | Declared here |
| [`setKeepAlive`](#setkeepalive-1) | `function` | Declared here |
| [`getKeepAlive`](#getkeepalive) | `function` | Declared here |
| [`write`](#write-24) | `function` | Declared here |
| [`write`](#write-25) | `function` | Declared here |
| [`write`](#write-26) | `function` | Declared here |
| [`HTTP_1_0`](#http_1_0) | `variable` | Declared here |
| [`HTTP_1_1`](#http_1_1) | `variable` | Declared here |
| [`IDENTITY_TRANSFER_ENCODING`](#identity_transfer_encoding) | `variable` | Declared here |
| [`CHUNKED_TRANSFER_ENCODING`](#chunked_transfer_encoding) | `variable` | Declared here |
| [`UNKNOWN_CONTENT_LENGTH`](#unknown_content_length) | `variable` | Declared here |
| [`UNKNOWN_CONTENT_TYPE`](#unknown_content_type) | `variable` | Declared here |
| [`CONTENT_LENGTH`](#content_length) | `variable` | Declared here |
| [`CONTENT_TYPE`](#content_type) | `variable` | Declared here |
| [`TRANSFER_ENCODING`](#transfer_encoding) | `variable` | Declared here |
| [`CONNECTION`](#connection-7) | `variable` | Declared here |
| [`CONNECTION_KEEP_ALIVE`](#connection_keep_alive) | `variable` | Declared here |
| [`CONNECTION_CLOSE`](#connection_close) | `variable` | Declared here |
| [`EMPTY`](#empty-4) | `variable` | Declared here |
| [`_version`](#_version-1) | `variable` | Declared here |
| [`Message`](#message-2) | `function` | Declared here |
| [`Message`](#message-3) | `function` | Declared here |
| [`~Message`](#message-4) | `function` | Declared here |
| [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-1) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-2) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-3) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`~NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-4) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`operator=`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-64) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`operator=`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-65) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`operator[]`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-66) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`set`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#set-1) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`add`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#add-4) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`add`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#add-5) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`get`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#get-7) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`get`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#get-8) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`has`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#has-2) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`find`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#find) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`begin`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#begin-5) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`end`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#end-2) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`empty`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#empty-2) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`size`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#size-5) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`erase`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#erase-1) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`clear`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#clear-3) | `function` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`Map`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#map-6) | `typedef` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`Iterator`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#iterator) | `typedef` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`ConstIterator`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#constiterator) | `typedef` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |
| [`_map`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#_map-2) | `variable` | Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) |

## Inherited from [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection)

| Kind | Name | Description |
|------|------|-------------|
| `function` | [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-1) `inline` |  |
| `function` | [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-2) `inline` |  |
| `function` | [`NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-3) `inline` `noexcept` |  |
| `function` | [`~NVCollection`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection-4) `virtual` `inline` |  |
| `function` | [`operator=`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-64)  | Assigns the name-value pairs of another [NVCollection](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#nvcollection) to this one. |
| `function` | [`operator=`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-65) `noexcept` |  |
| `function` | [`operator[]`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#operator-66) `const` | Returns the value of the (first) name-value pair with the given name. |
| `function` | [`set`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#set-1)  | Sets the value of the (first) name-value pair with the given name. |
| `function` | [`add`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#add-4)  | Adds a new name-value pair with the given name and value. |
| `function` | [`add`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#add-5)  | Adds a new name-value pair using move semantics. |
| `function` | [`get`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#get-7) `const` | Returns the value of the first name-value pair with the given name. |
| `function` | [`get`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#get-8) `const` | Returns the value of the first name-value pair with the given name. If no value with the given name has been found, the defaultValue is returned. |
| `function` | [`has`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#has-2) `const` | Returns true if there is at least one name-value pair with the given name. |
| `function` | [`find`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#find) `const` | Returns an iterator pointing to the first name-value pair with the given name. |
| `function` | [`begin`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#begin-5) `const` | Returns an iterator pointing to the begin of the name-value pair collection. |
| `function` | [`end`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#end-2) `const` | Returns an iterator pointing to the end of the name-value pair collection. |
| `function` | [`empty`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#empty-2) `const` | Returns true iff the header does not have any content. |
| `function` | [`size`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#size-5) `const` | Returns the number of name-value pairs in the collection. |
| `function` | [`erase`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#erase-1)  | Removes all name-value pairs with the given name. |
| `function` | [`clear`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#clear-3)  | Removes all name-value pairs and their values. |
| `typedef` | [`Map`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#map-6)  |  |
| `typedef` | [`Iterator`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#iterator)  |  |
| `typedef` | [`ConstIterator`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#constiterator)  |  |
| `variable` | [`_map`](https://auscaster.com/icey/docs/api-reference/icy-NVCollection.md#_map-2)  |  |

## Public Methods

| Return | Name | Description |
|--------|------|-------------|
| `void` | [`setVersion`](#setversion-1)  | Sets the HTTP version for this message. |
| `const std::string &` | [`getVersion`](#getversion-1) `const` | Returns the HTTP version for this message. |
| `void` | [`setContentLength`](#setcontentlength)  | Sets the Content-Length header. |
| `uint64_t` | [`getContentLength`](#getcontentlength) `const` | Returns the content length for this message, which may be UNKNOWN_CONTENT_LENGTH if no Content-Length header is present. |
| `bool` | [`hasContentLength`](#hascontentlength) `const` | Returns true if a Content-Length header is present. |
| `void` | [`setTransferEncoding`](#settransferencoding)  | Sets the transfer encoding for this message. |
| `const std::string &` | [`getTransferEncoding`](#gettransferencoding) `const` | Returns the transfer encoding used for this message. |
| `void` | [`setChunkedTransferEncoding`](#setchunkedtransferencoding)  | If flag is true, sets the Transfer-Encoding header to chunked. Otherwise, removes the Transfer-Encoding header. |
| `bool` | [`isChunkedTransferEncoding`](#ischunkedtransferencoding) `const` | Returns true if the Transfer-Encoding header is set and its value is chunked. |
| `void` | [`setContentType`](#setcontenttype)  | Sets the content type for this message. |
| `const std::string &` | [`getContentType`](#getcontenttype) `const` | Returns the content type for this message. |
| `void` | [`setKeepAlive`](#setkeepalive-1)  | Sets the value of the [Connection](https://auscaster.com/icey/docs/api-reference/icy-http-Connection.md#connection-1) header field. |
| `bool` | [`getKeepAlive`](#getkeepalive) `const` | Returns true if |
| `void` | [`write`](#write-24) `virtual` `const` | Writes the message header to the given output stream. |
| `void` | [`write`](#write-25) `virtual` `const` | Writes the message header to the given output string. |
| `void` | [`write`](#write-26) `virtual` `const` | Writes the message header directly into a byte buffer. |

---

<a id="setversion-1"></a>

### setVersion

```cpp
void setVersion(const std::string & version)
```

[Defined in src/http/include/icy/http/message.h:32](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L32)

Sets the HTTP version for this message.

---

<a id="getversion-1"></a>

### getVersion

`const`

```cpp
const std::string & getVersion() const
```

[Defined in src/http/include/icy/http/message.h:35](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L35)

Returns the HTTP version for this message.

---

<a id="setcontentlength"></a>

### setContentLength

```cpp
void setContentLength(uint64_t length)
```

[Defined in src/http/include/icy/http/message.h:41](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L41)

Sets the Content-Length header.

If length is UNKNOWN_CONTENT_LENGTH, removes the Content-Length header.

---

<a id="getcontentlength"></a>

### getContentLength

`const`

```cpp
uint64_t getContentLength() const
```

[Defined in src/http/include/icy/http/message.h:46](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L46)

Returns the content length for this message, which may be UNKNOWN_CONTENT_LENGTH if no Content-Length header is present.

---

<a id="hascontentlength"></a>

### hasContentLength

`const`

```cpp
bool hasContentLength() const
```

[Defined in src/http/include/icy/http/message.h:49](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L49)

Returns true if a Content-Length header is present.

---

<a id="settransferencoding"></a>

### setTransferEncoding

```cpp
void setTransferEncoding(const std::string & transferEncoding)
```

[Defined in src/http/include/icy/http/message.h:55](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L55)

Sets the transfer encoding for this message.

The value should be either IDENTITY_TRANSFER_CODING or CHUNKED_TRANSFER_CODING.

---

<a id="gettransferencoding"></a>

### getTransferEncoding

`const`

```cpp
const std::string & getTransferEncoding() const
```

[Defined in src/http/include/icy/http/message.h:62](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L62)

Returns the transfer encoding used for this message.

Normally, this is the value of the Transfer-Encoding header field. If no such field is present, returns IDENTITY_TRANSFER_CODING.

---

<a id="setchunkedtransferencoding"></a>

### setChunkedTransferEncoding

```cpp
void setChunkedTransferEncoding(bool flag)
```

[Defined in src/http/include/icy/http/message.h:66](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L66)

If flag is true, sets the Transfer-Encoding header to chunked. Otherwise, removes the Transfer-Encoding header.

---

<a id="ischunkedtransferencoding"></a>

### isChunkedTransferEncoding

`const`

```cpp
bool isChunkedTransferEncoding() const
```

[Defined in src/http/include/icy/http/message.h:70](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L70)

Returns true if the Transfer-Encoding header is set and its value is chunked.

---

<a id="setcontenttype"></a>

### setContentType

```cpp
void setContentType(const std::string & contentType)
```

[Defined in src/http/include/icy/http/message.h:76](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L76)

Sets the content type for this message.

Specify NO_CONTENT_TYPE to remove the Content-Type header.

---

<a id="getcontenttype"></a>

### getContentType

`const`

```cpp
const std::string & getContentType() const
```

[Defined in src/http/include/icy/http/message.h:82](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L82)

Returns the content type for this message.

If no Content-Type header is present, returns UNKNOWN_CONTENT_TYPE.

---

<a id="setkeepalive-1"></a>

### setKeepAlive

```cpp
void setKeepAlive(bool keepAlive)
```

[Defined in src/http/include/icy/http/message.h:88](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L88)

Sets the value of the [Connection](https://auscaster.com/icey/docs/api-reference/icy-http-Connection.md#connection-1) header field.

The value is set to "Keep-Alive" if keepAlive is true, or to "Close" otherwise.

---

<a id="getkeepalive"></a>

### getKeepAlive

`const`

```cpp
bool getKeepAlive() const
```

[Defined in src/http/include/icy/http/message.h:94](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L94)

Returns true if

* the message has a [Connection](https://auscaster.com/icey/docs/api-reference/icy-http-Connection.md#connection-1) header field and its value is "Keep-Alive"
* the message is an HTTP/1.1 message and no [Connection](https://auscaster.com/icey/docs/api-reference/icy-http-Connection.md#connection-1) header is set Returns false otherwise.

---

<a id="write-24"></a>

### write

`virtual` `const`

```cpp
virtual void write(std::ostream & ostr) const
```

[Defined in src/http/include/icy/http/message.h:102](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L102)

Writes the message header to the given output stream.

The format is one name-value pair per line, with name and value separated by a colon and lines delimited by a carriage return and a linefeed character. See RFC 2822 for details.

#### Reimplemented by

- [`Request::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Request.md#write-27)
- [`Response::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Response.md#write-30)

---

<a id="write-25"></a>

### write

`virtual` `const`

```cpp
virtual void write(std::string & str) const
```

[Defined in src/http/include/icy/http/message.h:105](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L105)

Writes the message header to the given output string.

#### Reimplemented by

- [`Request::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Request.md#write-28)
- [`Response::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Response.md#write-31)

---

<a id="write-26"></a>

### write

`virtual` `const`

```cpp
virtual void write(Buffer & buf) const
```

[Defined in src/http/include/icy/http/message.h:108](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L108)

Writes the message header directly into a byte buffer.

#### Reimplemented by

- [`Request::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Request.md#write-29)
- [`Response::write`](https://auscaster.com/icey/docs/api-reference/icy-http-Response.md#write-32)

## Public Static Attributes

| Return | Name | Description |
|--------|------|-------------|
| `const std::string` | [`HTTP_1_0`](#http_1_0) `static` |  |
| `const std::string` | [`HTTP_1_1`](#http_1_1) `static` |  |
| `const std::string` | [`IDENTITY_TRANSFER_ENCODING`](#identity_transfer_encoding) `static` |  |
| `const std::string` | [`CHUNKED_TRANSFER_ENCODING`](#chunked_transfer_encoding) `static` |  |
| `const int` | [`UNKNOWN_CONTENT_LENGTH`](#unknown_content_length) `static` |  |
| `const std::string` | [`UNKNOWN_CONTENT_TYPE`](#unknown_content_type) `static` |  |
| `const std::string` | [`CONTENT_LENGTH`](#content_length) `static` |  |
| `const std::string` | [`CONTENT_TYPE`](#content_type) `static` |  |
| `const std::string` | [`TRANSFER_ENCODING`](#transfer_encoding) `static` |  |
| `const std::string` | [`CONNECTION`](#connection-7) `static` |  |
| `const std::string` | [`CONNECTION_KEEP_ALIVE`](#connection_keep_alive) `static` |  |
| `const std::string` | [`CONNECTION_CLOSE`](#connection_close) `static` |  |
| `const std::string` | [`EMPTY`](#empty-4) `static` |  |

---

<a id="http_1_0"></a>

### HTTP_1_0

`static`

```cpp
const std::string HTTP_1_0
```

[Defined in src/http/include/icy/http/message.h:110](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L110)

---

<a id="http_1_1"></a>

### HTTP_1_1

`static`

```cpp
const std::string HTTP_1_1
```

[Defined in src/http/include/icy/http/message.h:111](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L111)

---

<a id="identity_transfer_encoding"></a>

### IDENTITY_TRANSFER_ENCODING

`static`

```cpp
const std::string IDENTITY_TRANSFER_ENCODING
```

[Defined in src/http/include/icy/http/message.h:113](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L113)

---

<a id="chunked_transfer_encoding"></a>

### CHUNKED_TRANSFER_ENCODING

`static`

```cpp
const std::string CHUNKED_TRANSFER_ENCODING
```

[Defined in src/http/include/icy/http/message.h:114](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L114)

---

<a id="unknown_content_length"></a>

### UNKNOWN_CONTENT_LENGTH

`static`

```cpp
const int UNKNOWN_CONTENT_LENGTH
```

[Defined in src/http/include/icy/http/message.h:116](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L116)

---

<a id="unknown_content_type"></a>

### UNKNOWN_CONTENT_TYPE

`static`

```cpp
const std::string UNKNOWN_CONTENT_TYPE
```

[Defined in src/http/include/icy/http/message.h:117](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L117)

---

<a id="content_length"></a>

### CONTENT_LENGTH

`static`

```cpp
const std::string CONTENT_LENGTH
```

[Defined in src/http/include/icy/http/message.h:119](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L119)

---

<a id="content_type"></a>

### CONTENT_TYPE

`static`

```cpp
const std::string CONTENT_TYPE
```

[Defined in src/http/include/icy/http/message.h:120](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L120)

---

<a id="transfer_encoding"></a>

### TRANSFER_ENCODING

`static`

```cpp
const std::string TRANSFER_ENCODING
```

[Defined in src/http/include/icy/http/message.h:121](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L121)

---

<a id="connection-7"></a>

### CONNECTION

`static`

```cpp
const std::string CONNECTION
```

[Defined in src/http/include/icy/http/message.h:122](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L122)

---

<a id="connection_keep_alive"></a>

### CONNECTION_KEEP_ALIVE

`static`

```cpp
const std::string CONNECTION_KEEP_ALIVE
```

[Defined in src/http/include/icy/http/message.h:124](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L124)

---

<a id="connection_close"></a>

### CONNECTION_CLOSE

`static`

```cpp
const std::string CONNECTION_CLOSE
```

[Defined in src/http/include/icy/http/message.h:125](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L125)

---

<a id="empty-4"></a>

### EMPTY

`static`

```cpp
const std::string EMPTY
```

[Defined in src/http/include/icy/http/message.h:127](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L127)

## Protected Attributes

| Return | Name | Description |
|--------|------|-------------|
| `std::string` | [`_version`](#_version-1)  |  |

---

<a id="_version-1"></a>

### _version

```cpp
std::string _version
```

[Defined in src/http/include/icy/http/message.h:130](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L130)

## Protected Methods

| Return | Name | Description |
|--------|------|-------------|
|  | [`Message`](#message-2)  | Creates the [Message](#message-1) with version HTTP/1.0. |
|  | [`Message`](#message-3)  | Creates the [Message](#message-1) and sets the version. |
|  | [`~Message`](#message-4) `virtual` | Destroys the [Message](#message-1). |

---

<a id="message-2"></a>

### Message

```cpp
Message()
```

[Defined in src/http/include/icy/http/message.h:133](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L133)

Creates the [Message](#message-1) with version HTTP/1.0.

---

<a id="message-3"></a>

### Message

```cpp
Message(const std::string & version)
```

[Defined in src/http/include/icy/http/message.h:137](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L137)

Creates the [Message](#message-1) and sets the version.

---

<a id="message-4"></a>

### ~Message

`virtual`

```cpp
virtual ~Message()
```

[Defined in src/http/include/icy/http/message.h:140](https://github.com/auscaster/icey/blob/main/src/http/include/icy/http/message.h#L140)

Destroys the [Message](#message-1).
