QHttpServerRequest Class
HTTP 요청을 캡슐화합니다. 더 보기...
| 헤더: | #include <QHttpServerRequest> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS HttpServer) target_link_libraries(mytarget PRIVATE Qt6::HttpServer) |
| qmake: | QT += httpserver |
| 다음부터: | Qt 6.4부터 |
공개 유형
공개 함수
(since 6.10) | QHttpServerRequest() |
(since 6.10) | QHttpServerRequest(const QHttpServerRequest &other) |
(since 6.10) | QHttpServerRequest(QHttpServerRequest &&other) |
| ~QHttpServerRequest() | |
| QByteArray | body() const |
| QHttpHeaders | headers() && |
| const QHttpHeaders & | headers() const & |
(since 6.5) QHostAddress | localAddress() const |
(since 6.5) quint16 | localPort() const |
| QHttpServerRequest::Method | method() const |
| QUrlQuery | query() const |
| QHostAddress | remoteAddress() const |
(since 6.5) quint16 | remotePort() const |
(since 6.7) QSslConfiguration | sslConfiguration() const |
(since 6.10) void | swap(QHttpServerRequest &other) |
| QUrl | url() const |
| QByteArray | value(const QByteArray &key) const |
(since 6.10) QHttpServerRequest & | operator=(QHttpServerRequest &&other) |
(since 6.10) QHttpServerRequest & | operator=(const QHttpServerRequest &other) |
관련 비멤버
| QDebug | operator<<(QDebug debug, const QHttpServerRequest &request) |
멤버 유형 문서
enum class QHttpServerRequest::Method
flags QHttpServerRequest::Methods
이 열거형 유형은 HTTP 요청 메서드를 지정합니다:
| 상수 | 값 | 설명 |
|---|---|---|
QHttpServerRequest::Method::Unknown | 0x0000 | 알 수 없는 메서드입니다. |
QHttpServerRequest::Method::Get | 0x0001 | HTTP GET 메서드. |
QHttpServerRequest::Method::Put | 0x0002 | HTTP PUT 메서드. |
QHttpServerRequest::Method::Delete | 0x0004 | HTTP DELETE 메서드. |
QHttpServerRequest::Method::Post | 0x0008 | HTTP POST 메서드. |
QHttpServerRequest::Method::Head | 0x0010 | HTTP HEAD 메서드. |
QHttpServerRequest::Method::Options | 0x0020 | HTTP OPTIONS 메서드. |
QHttpServerRequest::Method::Patch | 0x0040 | HTTP PATCH 메서드 (RFC 5789). |
QHttpServerRequest::Method::Connect | 0x0080 | HTTP CONNECT 메서드. |
QHttpServerRequest::Method::Trace | 0x0100 | HTTP TRACE 메서드. |
QHttpServerRequest::Method::AnyKnown | Get | Put | Delete | Post | Head | Options | Patch | Connect | Trace | 알려진 모든 메서드의 조합. |
Methods 유형은 QFlags<Method>에 대한 typedef입니다. 이 유형은 Method 값들의 OR 조합을 저장합니다.
멤버 함수 문서
[since 6.10] QHttpServerRequest::QHttpServerRequest()
QHttpServerRequest 객체를 생성합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
[since 6.10] QHttpServerRequest::QHttpServerRequest(const QHttpServerRequest &other)
Copy는 ` other`를 사용하여 QHttpServerRequest 객체를 생성합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
[constexpr noexcept default, since 6.10] QHttpServerRequest::QHttpServerRequest(QHttpServerRequest &&other)
Move는 ` other`를 사용하여 `QHttpServerRequest`를 생성합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
[noexcept] QHttpServerRequest::~QHttpServerRequest()
~를 파괴합니다 QHttpServerRequest
QByteArray QHttpServerRequest::body() const
요청 본문을 반환합니다.
QHttpHeaders QHttpServerRequest::headers() &&
const QHttpHeaders &QHttpServerRequest::headers() const &
모든 요청 헤더를 반환합니다.
[since 6.5] QHostAddress QHttpServerRequest::localAddress() const
요청을 수신한 로컬 소켓의 호스트 주소를 반환합니다.
이 함수는 Qt 6.5에서 도입되었습니다.
[since 6.5] quint16 QHttpServerRequest::localPort() const
요청을 수신한 로컬 소켓의 포트를 반환합니다.
이 함수는 Qt 6.5에서 도입되었습니다.
QHttpServerRequest::Method QHttpServerRequest::method() const
요청의 메서드를 반환합니다.
QUrlQuery QHttpServerRequest::query() const
요청에 포함된 쿼리를 반환합니다.
QHostAddress QHttpServerRequest::remoteAddress() const
요청의 발신 호스트 주소를 반환합니다.
[since 6.5] quint16 QHttpServerRequest::remotePort() const
요청의 발신 호스트의 포트를 반환합니다.
이 함수는 Qt 6.5에서 도입되었습니다.
[since 6.7] QSslConfiguration QHttpServerRequest::sslConfiguration() const
설정된 TLS 연결의 구성을 반환합니다. 연결이 TLS를 사용하지 않는 경우, 해당 구성은 isNull()에서 true를 반환합니다.
이 함수는 Qt 6.7에서 도입되었습니다.
[noexcept, since 6.10] void QHttpServerRequest::swap(QHttpServerRequest &other)
이 객체와 ` other` 간의 값을 바꿉니다.
이 함수는 Qt 6.10에서 도입되었습니다.
QUrl QHttpServerRequest::url() const
요청에서 지정한 URL을 반환합니다.
QByteArray QHttpServerRequest::value(const QByteArray &key) const
key 라는 이름을 가진 모든 헤더의 합산 값을 반환합니다.
[noexcept, since 6.10] QHttpServerRequest &QHttpServerRequest::operator=(QHttpServerRequest &&other)
Move는 other 를 사용하여 QHttpServerRequest 를 할당합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
[since 6.10] QHttpServerRequest &QHttpServerRequest::operator=(const QHttpServerRequest &other)
other 를 사용하여 QHttpServerRequest 를 할당합니다.
이 함수는 Qt 6.10에서 도입되었습니다.
관련 비회원 변수
QDebug operator<<(QDebug debug, const QHttpServerRequest &request)
request 에 대한 정보를 debug 스트림에 기록합니다.
QDebug도 참조하십시오 .
© 2026 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.