Declaration [src]

const char*
soup_message_headers_get_one (
  SoupMessageHeaders* hdrs,
  const char* name

Description [src]

Gets the value of header name in hdrs.

Use this for headers whose values are not comma-delimited lists, and which therefore can only appear at most once in the headers. For list-valued headers, use soup_message_headers_get_list().

If hdrs does erroneously contain multiple copies of the header, it is not defined which one will be returned. (Ideally, it will return whichever one makes libsoup most compatible with other HTTP implementations.)


name const char*

Header name.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: const char*

The header’s value or NULL if not found.

 The data is owned by the instance.
 The return value can be NULL.
 The value is a NUL terminated UTF-8 string.