### Struct

# Soup MessageHeaders

#### Description [src]

    struct SoupMessageHeaders {
      /* No available fields */
    }

The HTTP message headers associated with a request or response.

#### Constructors

###### soup_message_headers_new

Creates a `SoupMessageHeaders`.

#### Instance methods

###### soup_message_headers_append

Appends a new header with name `name` and value `value` to `hdrs`.

###### soup_message_headers_clean_connection_headers

Removes all the headers listed in the Connection header.

###### soup_message_headers_clear

Clears `hdrs`.

###### soup_message_headers_foreach

Calls `func` once for each header value in `hdrs`.

###### soup_message_headers_free_ranges

Frees the array of ranges returned from `soup_message_headers_get_ranges()`.

###### soup_message_headers_get_content_disposition

Looks up the “Content-Disposition” header in `hdrs`, parses it, and returns its value in `disposition` and `params`.

###### soup_message_headers_get_content_length

Gets the message body length that `hdrs` declare.

###### soup_message_headers_get_content_range

Parses `hdrs`‘s Content-Range header and returns it in `start`, `end`, and `total_length`. If the total length field in the header was specified as “*”, then `total_length` will be set to -1.

###### soup_message_headers_get_content_type

Looks up the “Content-Type” header in `hdrs`, parses it, and returns its value in `content_type` and `params`.

###### soup_message_headers_get_encoding

Gets the message body encoding that `hdrs` declare.

###### soup_message_headers_get_expectations

Gets the expectations declared by `hdrs`‘s “Expect” header.

###### soup_message_headers_get_headers_type

Gets the type of headers.

###### soup_message_headers_get_list

Gets the value of header `name` in `hdrs`.

###### soup_message_headers_get_one

Gets the value of header `name` in `hdrs`.

###### soup_message_headers_get_ranges

Parses `hdrs`‘s Range header and returns an array of the requested byte ranges.

###### soup_message_headers_header_contains

Checks whether the list-valued header `name` is present in `hdrs`, and contains a case-insensitive match for `token`.

###### soup_message_headers_header_equals

Checks whether the header `name` is present in `hdrs` and is (case-insensitively) equal to `value`.

###### soup_message_headers_ref

Atomically increments the reference count of `hdrs` by one.

###### soup_message_headers_remove

Removes `name` from `hdrs`.

###### soup_message_headers_replace

Replaces the value of the header `name` in `hdrs` with `value`.

###### soup_message_headers_set_content_disposition

Sets the “Content-Disposition” header in `hdrs` to `disposition`, optionally with additional parameters specified in `params`.

###### soup_message_headers_set_content_length

Sets the message body length that `hdrs` will declare, and sets `hdrs`‘s encoding to `SOUP_ENCODING_CONTENT_LENGTH`.

###### soup_message_headers_set_content_range

Sets `hdrs`‘s Content-Range header according to the given values.

###### soup_message_headers_set_content_type

Sets the “Content-Type” header in `hdrs` to `content_type`.

###### soup_message_headers_set_encoding

Sets the message body encoding that `hdrs` will declare.

###### soup_message_headers_set_expectations

Sets `hdrs`‘s “Expect” header according to `expectations`.

###### soup_message_headers_set_range

Sets `hdrs`‘s Range header to request the indicated range.

###### soup_message_headers_set_ranges

Sets `hdrs`‘s Range header to request the indicated ranges.

###### soup_message_headers_unref

Atomically decrements the reference count of `hdrs` by one.