Loading...
Searching...
No Matches
Public Member Functions | List of all members
BPrivate::Network::BHttpFields::FieldName Class Reference

Representation of a HTTP header name. More...

Public Member Functions

 operator std::string_view () const
 Return a std::string_view over the header name.
 
bool operator== (const BString &other) const noexcept
 Compare the header name to a string.
 
bool operator== (const FieldName &other) const noexcept
 
bool operator== (const std::string_view &other) const noexcept
 

Detailed Description

Representation of a HTTP header name.

As per the HTTP specification, header fields have a name. There are limitations to which characters are supported. As per the specification, header field names are case insensitive. This means that the content-encoding is equal to Content-Encoding or even COnTenT-ENcOdING.

A header field name can never be empty.

Since
Haiku R1

Member Function Documentation

◆ operator std::string_view()

BPrivate::Network::BHttpFields::FieldName::operator std::string_view ( ) const

Return a std::string_view over the header name.

Returns
A std::string_view object over the header name.
Since
Haiku R1

◆ operator==() [1/3]

bool BPrivate::Network::BHttpFields::FieldName::operator== ( const BString other) const
noexcept

Compare the header name to a string.

Parameters
otherThe other string to compare it to.

The comparison is case-insensitive. So if this header name is set to Content-Encoding, comparing it to content-encoding will return true.

Return values
trueThe current header name is equal to the other name.
falseThe current header name is different from the other name.
Since
Haiku R1

◆ operator==() [2/3]

bool BPrivate::Network::BHttpFields::FieldName::operator== ( const FieldName other) const
noexcept

Compare the header name to a string. noexcept

Parameters
otherThe other string to compare it to.

The comparison is case-insensitive. So if this header name is set to Content-Encoding, comparing it to content-encoding will return true.

Return values
trueThe current header name is equal to the other name.
falseThe current header name is different from the other name.
Since
Haiku R1 noexcept

◆ operator==() [3/3]

bool BPrivate::Network::BHttpFields::FieldName::operator== ( const std::string_view &  other) const
noexcept

Compare the header name to a string. noexcept

Parameters
otherThe other string to compare it to.

The comparison is case-insensitive. So if this header name is set to Content-Encoding, comparing it to content-encoding will return true.

Return values
trueThe current header name is equal to the other name.
falseThe current header name is different from the other name.
Since
Haiku R1 noexcept