### Method

# Soup MessageHeaders foreach

#### Declaration [src]

    void
    soup_message_headers_foreach (
      SoupMessageHeaders* hdrs,
      SoupMessageHeadersForeachFunc func,
      gpointer user_data
    )

#### Description [src]

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

Beware that unlike `soup_message_headers_get_list()`, this processes the headers in exactly the way they were added, rather than concatenating multiple same-named headers into a single value. (This is intentional; it ensures that if you call `soup_message_headers_append()` multiple times with the same name, then the I/O code will output multiple copies of the header when sending the message to the remote implementation, which may be required for interoperability in some cases.)

You may not modify the headers from `func`.

#### Parameters

`func`

  Type: `SoupMessageHeadersForeachFunc`

  Callback function to run for each header.

`user_data`

  Type: `gpointer`

  Data to pass to `func`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.