QHttpHeaders Class

QHttpHeaders는 HTTP 헤더를 보관하는 클래스입니다. 더 보기...

Header: #include <QHttpHeaders>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network
이후: Qt 6.7

공용 형

enum class WellKnownHeader { AIM, Accept, AcceptAdditions, AcceptCH, AcceptDatetime, …, ProtocolQuery }

공용 함수

QHttpHeaders()
QHttpHeaders(const QHttpHeaders &other)
QHttpHeaders(QHttpHeaders &&other)
~QHttpHeaders()
bool append(QAnyStringView name, QAnyStringView value)
bool append(QHttpHeaders::WellKnownHeader name, QAnyStringView value)
void clear()
QByteArray combinedValue(QAnyStringView name) const
QByteArray combinedValue(QHttpHeaders::WellKnownHeader name) const
bool contains(QAnyStringView name) const
bool contains(QHttpHeaders::WellKnownHeader name) const
bool insert(qsizetype i, QAnyStringView name, QAnyStringView value)
bool insert(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView value)
bool isEmpty() const
QLatin1StringView nameAt(qsizetype i) const
void removeAll(QAnyStringView name)
void removeAll(QHttpHeaders::WellKnownHeader name)
void removeAt(qsizetype i)
bool replace(qsizetype i, QAnyStringView name, QAnyStringView newValue)
bool replace(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView newValue)
(since 6.8) bool replaceOrAppend(QHttpHeaders::WellKnownHeader name, QAnyStringView newValue)
bool replaceOrAppend(QAnyStringView name, QAnyStringView newValue)
void reserve(qsizetype size)
qsizetype size() const
void swap(QHttpHeaders &other)
QList<std::pair<QByteArray, QByteArray>> toListOfPairs() const
QMultiHash<QByteArray, QByteArray> toMultiHash() const
QMultiMap<QByteArray, QByteArray> toMultiMap() const
QByteArrayView value(QAnyStringView name, QByteArrayView defaultValue = {}) const
QByteArrayView value(QHttpHeaders::WellKnownHeader name, QByteArrayView defaultValue = {}) const
QByteArrayView valueAt(qsizetype i) const
QList<QByteArray> values(QAnyStringView name) const
QList<QByteArray> values(QHttpHeaders::WellKnownHeader name) const
QHttpHeaders &operator=(QHttpHeaders &&other)
QHttpHeaders &operator=(const QHttpHeaders &other)

정적 공용 멤버

QHttpHeaders fromListOfPairs(const QList<std::pair<QByteArray, QByteArray>> &headers)
QHttpHeaders fromMultiHash(const QMultiHash<QByteArray, QByteArray> &headers)
QHttpHeaders fromMultiMap(const QMultiMap<QByteArray, QByteArray> &headers)
QByteArrayView wellKnownHeaderName(QHttpHeaders::WellKnownHeader name)
QDebug operator<<(QDebug debug, const QHttpHeaders &headers)

상세 설명

이 클래스는 이러한 헤더를 사용하거나 소비하는 Qt 네트워킹 API를 위한 인터페이스 유형입니다.

허용되는 필드 이름 및 값 문자

HTTP 헤더는 이름과 값으로 구성됩니다. 이를 설정할 때 QHttpHeaders는 이름과 값이 HTTP RFC에서 허용하는 문자만 포함하도록 유효성을 검사합니다. 자세한 내용은 RFC 9110 5.1장 및 5.5장을 참조하세요.

결국, 이는

  • name 보이는 ASCII 문자로 구성되어야 하며 비어 있지 않아야 합니다.
  • value 헤더 및 사용 사례별 인코딩 규칙을 준수하는 한 임의의 바이트로 구성될 수 있습니다. value 는 비어 있을 수 있습니다.

이 클래스의 설정자는 처리 중에 공백을 무시해야 하므로 값에서 선행 또는 후행 공백을 자동으로 제거합니다.

값 결합

대부분의 HTTP 헤더 값은 쉼표 하나 ',' 와 선택적 공백으로 결합할 수 있으며, 의미론적 의미는 그대로 유지됩니다. 예를 들어, 이 두 값은 의미적으로 유사해야 합니다:

// Values as separate header entries
myheadername: myheadervalue1
myheadername: myheadervalue2
// Combined value
myheadername: myheadervalue1, myheadervalue2

그러나 이 규칙에는 주목할 만한 예외가 있습니다: Set-Cookie입니다. 이 규칙과 사용자 정의 사용 사례의 가능성으로 인해 QHttpHeaders는 자동으로 값을 결합하지 않습니다.

성능

대부분의 QHttpHeaders 함수는 QHttpHeaders::WellKnownHeaderQAnyStringView 과부하를 모두 제공합니다. 메모리 사용 및 계산 관점에서 볼 때 QHttpHeaders::WellKnownHeader 오버로드를 사용하는 것이 좋습니다.

멤버 유형 문서

enum class QHttpHeaders::WellKnownHeader

IANA 레지스트리에 따라 잘 알려진 헤더 목록입니다.

ConstantValue
QHttpHeaders::WellKnownHeader::AIM0
QHttpHeaders::WellKnownHeader::Accept1
QHttpHeaders::WellKnownHeader::AcceptAdditions2
QHttpHeaders::WellKnownHeader::AcceptCH3
QHttpHeaders::WellKnownHeader::AcceptDatetime4
QHttpHeaders::WellKnownHeader::AcceptEncoding5
QHttpHeaders::WellKnownHeader::AcceptFeatures6
QHttpHeaders::WellKnownHeader::AcceptLanguage7
QHttpHeaders::WellKnownHeader::AcceptPatch8
QHttpHeaders::WellKnownHeader::AcceptPost9
QHttpHeaders::WellKnownHeader::AcceptRanges10
QHttpHeaders::WellKnownHeader::AcceptSignature11
QHttpHeaders::WellKnownHeader::AccessControlAllowCredentials12
QHttpHeaders::WellKnownHeader::AccessControlAllowHeaders13
QHttpHeaders::WellKnownHeader::AccessControlAllowMethods14
QHttpHeaders::WellKnownHeader::AccessControlAllowOrigin15
QHttpHeaders::WellKnownHeader::AccessControlExposeHeaders16
QHttpHeaders::WellKnownHeader::AccessControlMaxAge17
QHttpHeaders::WellKnownHeader::AccessControlRequestHeaders18
QHttpHeaders::WellKnownHeader::AccessControlRequestMethod19
QHttpHeaders::WellKnownHeader::Age20
QHttpHeaders::WellKnownHeader::Allow21
QHttpHeaders::WellKnownHeader::ALPN22
QHttpHeaders::WellKnownHeader::AltSvc23
QHttpHeaders::WellKnownHeader::AltUsed24
QHttpHeaders::WellKnownHeader::Alternates25
QHttpHeaders::WellKnownHeader::ApplyToRedirectRef26
QHttpHeaders::WellKnownHeader::AuthenticationControl27
QHttpHeaders::WellKnownHeader::AuthenticationInfo28
QHttpHeaders::WellKnownHeader::Authorization29
QHttpHeaders::WellKnownHeader::CacheControl30
QHttpHeaders::WellKnownHeader::CacheStatus31
QHttpHeaders::WellKnownHeader::CalManagedID32
QHttpHeaders::WellKnownHeader::CalDAVTimezones33
QHttpHeaders::WellKnownHeader::CapsuleProtocol34
QHttpHeaders::WellKnownHeader::CDNCacheControl35
QHttpHeaders::WellKnownHeader::CDNLoop36
QHttpHeaders::WellKnownHeader::CertNotAfter37
QHttpHeaders::WellKnownHeader::CertNotBefore38
QHttpHeaders::WellKnownHeader::ClearSiteData39
QHttpHeaders::WellKnownHeader::ClientCert40
QHttpHeaders::WellKnownHeader::ClientCertChain41
QHttpHeaders::WellKnownHeader::Close42
QHttpHeaders::WellKnownHeader::Connection43
QHttpHeaders::WellKnownHeader::ContentDigest44
QHttpHeaders::WellKnownHeader::ContentDisposition45
QHttpHeaders::WellKnownHeader::ContentEncoding46
QHttpHeaders::WellKnownHeader::ContentID47
QHttpHeaders::WellKnownHeader::ContentLanguage48
QHttpHeaders::WellKnownHeader::ContentLength49
QHttpHeaders::WellKnownHeader::ContentLocation50
QHttpHeaders::WellKnownHeader::ContentRange51
QHttpHeaders::WellKnownHeader::ContentSecurityPolicy52
QHttpHeaders::WellKnownHeader::ContentSecurityPolicyReportOnly53
QHttpHeaders::WellKnownHeader::ContentType54
QHttpHeaders::WellKnownHeader::Cookie55
QHttpHeaders::WellKnownHeader::CrossOriginEmbedderPolicy56
QHttpHeaders::WellKnownHeader::CrossOriginEmbedderPolicyReportOnly57
QHttpHeaders::WellKnownHeader::CrossOriginOpenerPolicy58
QHttpHeaders::WellKnownHeader::CrossOriginOpenerPolicyReportOnly59
QHttpHeaders::WellKnownHeader::CrossOriginResourcePolicy60
QHttpHeaders::WellKnownHeader::DASL61
QHttpHeaders::WellKnownHeader::Date62
QHttpHeaders::WellKnownHeader::DAV63
QHttpHeaders::WellKnownHeader::DeltaBase64
QHttpHeaders::WellKnownHeader::Depth65
QHttpHeaders::WellKnownHeader::Destination66
QHttpHeaders::WellKnownHeader::DifferentialID67
QHttpHeaders::WellKnownHeader::DPoP68
QHttpHeaders::WellKnownHeader::DPoPNonce69
QHttpHeaders::WellKnownHeader::EarlyData70
QHttpHeaders::WellKnownHeader::ETag71
QHttpHeaders::WellKnownHeader::Expect72
QHttpHeaders::WellKnownHeader::ExpectCT73
QHttpHeaders::WellKnownHeader::Expires74
QHttpHeaders::WellKnownHeader::Forwarded75
QHttpHeaders::WellKnownHeader::From76
QHttpHeaders::WellKnownHeader::Hobareg77
QHttpHeaders::WellKnownHeader::Host78
QHttpHeaders::WellKnownHeader::If79
QHttpHeaders::WellKnownHeader::IfMatch80
QHttpHeaders::WellKnownHeader::IfModifiedSince81
QHttpHeaders::WellKnownHeader::IfNoneMatch82
QHttpHeaders::WellKnownHeader::IfRange83
QHttpHeaders::WellKnownHeader::IfScheduleTagMatch84
QHttpHeaders::WellKnownHeader::IfUnmodifiedSince85
QHttpHeaders::WellKnownHeader::IM86
QHttpHeaders::WellKnownHeader::IncludeReferredTokenBindingID87
QHttpHeaders::WellKnownHeader::KeepAlive88
QHttpHeaders::WellKnownHeader::Label89
QHttpHeaders::WellKnownHeader::LastEventID90
QHttpHeaders::WellKnownHeader::LastModified91
QHttpHeaders::WellKnownHeader::Link92
QHttpHeaders::WellKnownHeader::Location93
QHttpHeaders::WellKnownHeader::LockToken94
QHttpHeaders::WellKnownHeader::MaxForwards95
QHttpHeaders::WellKnownHeader::MementoDatetime96
QHttpHeaders::WellKnownHeader::Meter97
QHttpHeaders::WellKnownHeader::MIMEVersion98
QHttpHeaders::WellKnownHeader::Negotiate99
QHttpHeaders::WellKnownHeader::NEL100
QHttpHeaders::WellKnownHeader::ODataEntityId101
QHttpHeaders::WellKnownHeader::ODataIsolation102
QHttpHeaders::WellKnownHeader::ODataMaxVersion103
QHttpHeaders::WellKnownHeader::ODataVersion104
QHttpHeaders::WellKnownHeader::OptionalWWWAuthenticate105
QHttpHeaders::WellKnownHeader::OrderingType106
QHttpHeaders::WellKnownHeader::Origin107
QHttpHeaders::WellKnownHeader::OriginAgentCluster108
QHttpHeaders::WellKnownHeader::OSCORE109
QHttpHeaders::WellKnownHeader::OSLCCoreVersion110
QHttpHeaders::WellKnownHeader::Overwrite111
QHttpHeaders::WellKnownHeader::PingFrom112
QHttpHeaders::WellKnownHeader::PingTo113
QHttpHeaders::WellKnownHeader::Position114
QHttpHeaders::WellKnownHeader::Prefer115
QHttpHeaders::WellKnownHeader::PreferenceApplied116
QHttpHeaders::WellKnownHeader::Priority117
QHttpHeaders::WellKnownHeader::ProxyAuthenticate118
QHttpHeaders::WellKnownHeader::ProxyAuthenticationInfo119
QHttpHeaders::WellKnownHeader::ProxyAuthorization120
QHttpHeaders::WellKnownHeader::ProxyStatus121
QHttpHeaders::WellKnownHeader::PublicKeyPins122
QHttpHeaders::WellKnownHeader::PublicKeyPinsReportOnly123
QHttpHeaders::WellKnownHeader::Range124
QHttpHeaders::WellKnownHeader::RedirectRef125
QHttpHeaders::WellKnownHeader::Referer126
QHttpHeaders::WellKnownHeader::Refresh127
QHttpHeaders::WellKnownHeader::ReplayNonce128
QHttpHeaders::WellKnownHeader::ReprDigest129
QHttpHeaders::WellKnownHeader::RetryAfter130
QHttpHeaders::WellKnownHeader::ScheduleReply131
QHttpHeaders::WellKnownHeader::ScheduleTag132
QHttpHeaders::WellKnownHeader::SecPurpose133
QHttpHeaders::WellKnownHeader::SecTokenBinding134
QHttpHeaders::WellKnownHeader::SecWebSocketAccept135
QHttpHeaders::WellKnownHeader::SecWebSocketExtensions136
QHttpHeaders::WellKnownHeader::SecWebSocketKey137
QHttpHeaders::WellKnownHeader::SecWebSocketProtocol138
QHttpHeaders::WellKnownHeader::SecWebSocketVersion139
QHttpHeaders::WellKnownHeader::Server140
QHttpHeaders::WellKnownHeader::ServerTiming141
QHttpHeaders::WellKnownHeader::SetCookie142
QHttpHeaders::WellKnownHeader::Signature143
QHttpHeaders::WellKnownHeader::SignatureInput144
QHttpHeaders::WellKnownHeader::SLUG145
QHttpHeaders::WellKnownHeader::SoapAction146
QHttpHeaders::WellKnownHeader::StatusURI147
QHttpHeaders::WellKnownHeader::StrictTransportSecurity148
QHttpHeaders::WellKnownHeader::Sunset149
QHttpHeaders::WellKnownHeader::SurrogateCapability150
QHttpHeaders::WellKnownHeader::SurrogateControl151
QHttpHeaders::WellKnownHeader::TCN152
QHttpHeaders::WellKnownHeader::TE153
QHttpHeaders::WellKnownHeader::Timeout154
QHttpHeaders::WellKnownHeader::Topic155
QHttpHeaders::WellKnownHeader::Traceparent156
QHttpHeaders::WellKnownHeader::Tracestate157
QHttpHeaders::WellKnownHeader::Trailer158
QHttpHeaders::WellKnownHeader::TransferEncoding159
QHttpHeaders::WellKnownHeader::TTL160
QHttpHeaders::WellKnownHeader::Upgrade161
QHttpHeaders::WellKnownHeader::Urgency162
QHttpHeaders::WellKnownHeader::UserAgent163
QHttpHeaders::WellKnownHeader::VariantVary164
QHttpHeaders::WellKnownHeader::Vary165
QHttpHeaders::WellKnownHeader::Via166
QHttpHeaders::WellKnownHeader::WantContentDigest167
QHttpHeaders::WellKnownHeader::WantReprDigest168
QHttpHeaders::WellKnownHeader::WWWAuthenticate169
QHttpHeaders::WellKnownHeader::XContentTypeOptions170
QHttpHeaders::WellKnownHeader::XFrameOptions171
QHttpHeaders::WellKnownHeader::AcceptCharset172
QHttpHeaders::WellKnownHeader::CPEPInfo173
QHttpHeaders::WellKnownHeader::Pragma174
QHttpHeaders::WellKnownHeader::ProtocolInfo175
QHttpHeaders::WellKnownHeader::ProtocolQuery176

멤버 함수 문서

[noexcept] QHttpHeaders::QHttpHeaders()

새 QHttpHeaders 객체를 생성합니다.

QHttpHeaders::QHttpHeaders(const QHttpHeaders &other)

other 의 복사본을 만듭니다.

[noexcept] QHttpHeaders::QHttpHeaders(QHttpHeaders &&other)

이동 - other 에서 객체를 생성하면 empty 으로 남게 됩니다.

[noexcept] QHttpHeaders::~QHttpHeaders()

헤더 객체를 폐기합니다.

bool QHttpHeaders::append(QAnyStringView name, QAnyStringView value)

namevalue 헤더 항목을 추가하고 성공하면 true 를 반환합니다.

append(QHttpHeaders::WellKnownHeader, QAnyStringView) 및 Allowed field name and value characters도 참조하세요 .

bool QHttpHeaders::append(QHttpHeaders::WellKnownHeader name, QAnyStringView value)

이 함수는 append(QAnyStringView, QAnyStringView)를 오버로드합니다.

void QHttpHeaders::clear()

모든 헤더 항목을 지웁니다.

size()도 참조하세요 .

QByteArray QHttpHeaders::combinedValue(QAnyStringView name) const

name 헤더의 값을 쉼표로 결합된 문자열로 반환합니다. name 헤더가 존재하지 않는 경우 null QByteArray 을 반환합니다.

참고: 이러한 방식으로 'Set-Cookie' 헤더의 값에 액세스하면 의도한 대로 작동하지 않을 수 있습니다. 이 헤더의 값은 이러한 방식으로 결합할 수 없다는 점에서 HTTP RFC에서 주목할 만한 예외입니다. 대신 values()를 선호합니다.

values(QAnyStringView)도 참조하세요 .

QByteArray QHttpHeaders::combinedValue(QHttpHeaders::WellKnownHeader name) const

이 함수는 combinedValue(QAnyStringView)를 오버로드합니다.

bool QHttpHeaders::contains(QAnyStringView name) const

헤더에 name 헤더가 포함되어 있는지 여부를 반환합니다.

contains(QHttpHeaders::WellKnownHeader)도 참조하세요 .

bool QHttpHeaders::contains(QHttpHeaders::WellKnownHeader name) const

이 함수는 has(QAnyStringView)를 오버로드합니다.

[static] QHttpHeaders QHttpHeaders::fromListOfPairs(const QList<std::pair<QByteArray, QByteArray>> &headers)

headers 로 채워진 새 QHttpHeaders 객체를 만듭니다.

Allowed field name and value characters도 참조하세요 .

[static] QHttpHeaders QHttpHeaders::fromMultiHash(const QMultiHash<QByteArray, QByteArray> &headers)

headers 로 채워진 새 QHttpHeaders 객체를 만듭니다.

Allowed field name and value characters도 참조하세요 .

[static] QHttpHeaders QHttpHeaders::fromMultiMap(const QMultiMap<QByteArray, QByteArray> &headers)

headers 로 채워진 새 QHttpHeaders 객체를 만듭니다.

Allowed field name and value characters도 참조하세요 .

bool QHttpHeaders::insert(qsizetype i, QAnyStringView name, QAnyStringView value)

인덱스 inamevalue 와 함께 헤더 항목을 삽입합니다. 인덱스는 유효해야 합니다( size() 참조). 삽입 성공 여부를 반환합니다.

append(), insert(qsizetype, QHttpHeaders::WellKnownHeader, QAnyStringView), size() 및 Allowed field name and value characters도 참조하세요 .

bool QHttpHeaders::insert(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView value)

이 함수는 insert(qsizetype, QAnyStringView, QAnyStringView)를 오버로드합니다.

[noexcept] bool QHttpHeaders::isEmpty() const

헤더의 크기가 0이면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

size()도 참조하세요 .

[noexcept] QLatin1StringView QHttpHeaders::nameAt(qsizetype i) const

인덱스 i 에서 헤더 이름을 반환합니다. i 인덱스는 유효해야 합니다( size() 참조).

헤더 이름은 대소문자를 구분하지 않으며 반환된 이름은 소문자로 표시됩니다.

size() 및 valueAt()도 참조하세요 .

void QHttpHeaders::removeAll(QAnyStringView name)

헤더를 제거합니다 name.

removeAt() 및 removeAll(QHttpHeaders::WellKnownHeader)도 참조하세요 .

void QHttpHeaders::removeAll(QHttpHeaders::WellKnownHeader name)

이 함수는 removeAll(QAnyStringView)를 오버로드합니다.

void QHttpHeaders::removeAt(qsizetype i)

색인 i 에서 헤더를 제거합니다. i 인덱스가 유효해야 합니다( size() 참조).

removeAll(QHttpHeaders::WellKnownHeader), removeAll(QAnyStringView) 및 size()도 참조하세요 .

bool QHttpHeaders::replace(qsizetype i, QAnyStringView name, QAnyStringView newValue)

인덱스 i 의 헤더 항목을 namenewValue 로 바꿉니다. 인덱스는 유효해야 합니다( size() 참조). 대체가 성공했는지 여부를 반환합니다.

append(), replace(qsizetype, QHttpHeaders::WellKnownHeader, QAnyStringView), size() 및 Allowed field name and value characters도 참조하세요 .

bool QHttpHeaders::replace(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView newValue)

이 함수는 replace(qsizetype, QAnyStringView, QAnyStringView)를 오버로드합니다.

[since 6.8] bool QHttpHeaders::replaceOrAppend(QHttpHeaders::WellKnownHeader name, QAnyStringView newValue)

QHttpHeaders 에 이미 name 이 포함되어 있는 경우 해당 값을 newValue 로 바꾸고 가능한 추가 name 항목을 제거합니다. name 이 존재하지 않으면 새 항목을 추가합니다. 성공하면 true 을 반환합니다.

이 함수는 고유한 name: newValue 헤더를 설정하기 위한 편리한 방법입니다. 대부분의 헤더에서 상대 순서는 중요하지 않으므로 기존 항목이 있는 경우 재사용할 수 있습니다.

이 함수는 Qt 6.8에 도입되었습니다.

replaceOrAppend(QAnyStringView, QAnyStringView)도 참조하십시오 .

bool QHttpHeaders::replaceOrAppend(QAnyStringView name, QAnyStringView newValue)

이 함수는 replaceOrAppend(WellKnownHeader, QAnyStringView)를 오버로드합니다.

void QHttpHeaders::reserve(qsizetype size)

최소 size 헤더 항목에 대한 메모리 할당을 시도합니다.

헤더 항목 수를 미리 알고 있는 경우 이 함수를 호출하여 재할당 및 메모리 조각화를 방지할 수 있습니다.

[noexcept] qsizetype QHttpHeaders::size() const

헤더 항목의 수를 반환합니다.

[noexcept] void QHttpHeaders::swap(QHttpHeaders &other)

QHttpHeadersother 으로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.

QList<std::pair<QByteArray, QByteArray>> QHttpHeaders::toListOfPairs() const

헤더 항목을 (이름, 값) 쌍의 목록으로 반환합니다. 헤더 이름은 대소문자를 구분하지 않으며 반환된 이름은 소문자로 표시됩니다.

QMultiHash<QByteArray, QByteArray> QHttpHeaders::toMultiHash() const

헤더 항목을 이름부터 값까지 해시로 반환합니다. 헤더 이름은 대소문자를 구분하지 않으며 반환된 이름은 소문자로 표시됩니다.

QMultiMap<QByteArray, QByteArray> QHttpHeaders::toMultiMap() const

헤더 항목을 이름에서 값까지의 맵으로 반환합니다. 헤더 이름은 대소문자를 구분하지 않으며 반환된 이름은 소문자로 표시됩니다.

[noexcept] QByteArrayView QHttpHeaders::value(QAnyStringView name, QByteArrayView defaultValue = {}) const

(첫 번째) 헤더의 값을 반환합니다 name, 또는 존재하지 않는 경우 defaultValue.

value(QHttpHeaders::WellKnownHeader, QByteArrayView)도 참조하세요 .

[noexcept] QByteArrayView QHttpHeaders::value(QHttpHeaders::WellKnownHeader name, QByteArrayView defaultValue = {}) const

이 함수는 value(QAnyStringView, QByteArrayView)를 오버로드합니다.

[noexcept] QByteArrayView QHttpHeaders::valueAt(qsizetype i) const

인덱스 i 에서 헤더 값을 반환합니다. i 인덱스가 유효해야 합니다( size() 참조).

size(), value(), values(), combinedValue() 및 nameAt()도 참조하세요 .

QList<QByteArray> QHttpHeaders::values(QAnyStringView name) const

name 헤더의 값을 목록으로 반환합니다. name 헤더가 존재하지 않으면 빈 리스트를 반환합니다.

values(QHttpHeaders::WellKnownHeader)도 참조하세요 .

QList<QByteArray> QHttpHeaders::values(QHttpHeaders::WellKnownHeader name) const

이 함수는 values(QAnyStringView)를 오버로드합니다.

[static noexcept] QByteArrayView QHttpHeaders::wellKnownHeaderName(QHttpHeaders::WellKnownHeader name)

제공된 name 에 해당하는 헤더 이름을 보기로 반환합니다.

[noexcept] QHttpHeaders &QHttpHeaders::operator=(QHttpHeaders &&other)

Move - other 를 할당하고 이 객체에 대한 참조를 반환합니다.

otherempty 로 남게 됩니다.

QHttpHeaders &QHttpHeaders::operator=(const QHttpHeaders &other)

other 의 내용을 할당하고 이 객체에 대한 참조를 반환합니다.

관련 비회원

QDebug operator<<(QDebug debug, const QHttpHeaders &headers)

headersdebug 스트림에 씁니다.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.