get_one


Description:

[ Version ( since = "2.28" ) ]
public unowned string? get_one (string name)

Gets the value of header name in this.

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 get_list.

If this 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.)

Parameters:

this

a MessageHeaders

name

header name

Returns:

the header's value or null if not found.




2022 vala-language.org