MessageHeaders.getOne

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.MessageHeaders.getList.

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

class MessageHeaders
string
getOne
(
string name
)

Parameters

name string

header name

Return Value

Type: string

the header's value or null if not found.