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 |
パブリックな型
パブリック関数
~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 |
QUrl | url() const |
QByteArray | value(const QByteArray &key) const |
関連する非メンバー
QDebug | operator<<(QDebug debug, const QHttpServerRequest &request) |
メンバ型の説明
enum class QHttpServerRequest::Method
flags QHttpServerRequest::Methods
この enum 型は 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である。メソッド値の OR の組み合わせを格納する。
メンバ関数ドキュメント
QHttpHeaders QHttpServerRequest::headers() &&
const QHttpHeaders &QHttpServerRequest::headers() const &
全てのリクエストヘッダを返します。
[noexcept]
QHttpServerRequest::~QHttpServerRequest()
を破壊する。QHttpServerRequest
QByteArray QHttpServerRequest::body() 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() で真を返します。
この関数は Qt 6.7 で導入されました。
QUrl QHttpServerRequest::url() const
リクエストが要求したURLを返す。
QByteArray QHttpServerRequest::value(const QByteArray &key) const
指定されたkey を持つ全てのヘッダーの合計値を返す。
© 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.