Commit Graph

7 Commits (5ea248155654b58fcb52ef326dc4d94de83d0409)

Author SHA1 Message Date
Marc Mutz a564618838 HttpTestServer: pass std::function by value and move into place
Virtually all callers of this function (will) pass rvalues, so take
the std::function by value (reaping C++17 guaranteed copy elision) and
std::move() into the member variable ("perfect sink").

Like for many owning types, moves are much cheaper than copies for
std::function, because the external state is merely tranferred between
objects, and not copied.

Amends e560adef21.

Pick-to: 6.7
Change-Id: I269b54e51ba09ac595ac4e4f255209778819adad
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 19:06:02 +02:00
Lena Biliaieva 15b0bd69ff Network: Use QHttpHeaders in QHttpHeaderParser
QHttpHeaderParser::headers() method is changed to return QHttpHeaders.
QAuthenticatorPrivate::parseHttpResponse() method is changed to work with QHttpHeaders.
QHttpNetworkHeader::header() method is updated to return QHttpHeaders.
Tests are updated.

Task-number: QTBUG-120133
Change-Id: I20a18b509acd7a8b8d93884cff8349519d64293e
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2024-01-25 00:48:10 +00:00
Juha Vuolle 8da4156da7 Add PATCH support for QRestAccessManager
It is somewhat common HTTP method with RESTful use cases
(partial updates on resources)

Task-number: QTBUG-114637
Change-Id: Id252d3f4b54c3ebb8df5c93259e64a4af2d0ca2f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-08 15:53:36 +02:00
Juha Vuolle a80ed49b10 QRestAM custom HTTP 'method' support
This commit adds support for sending custom, non-standard, HTTP
methods / verbs.

Fixes: QTBUG-116262
Change-Id: I77addb389a7e4346b63526176bf8323696a7a337
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-12-08 15:53:36 +02:00
Juha Vuolle 669a48e5ae Functions for setting request transfer timeouts
Added to both QNetworkRequestFactory and QRestAccessManager

Task-number: QTBUG-114717
Change-Id: Ibca55bba548a034a0da7ea60550642c150b63dc2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-08 15:53:35 +02:00
Juha Vuolle e9f703ed3b Add signals and methods for QRestReply download progress
These include:
- readyRead(), signal for indicating new data availability
- bytesAvailable(), function for checking available data amount
- downloadProgress(), signal for monitoring download progress

Task-number: QTBUG-114717
Change-Id: Id6c49530d7857f5c76bd111eba84525137294ea7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-12-08 15:53:33 +02:00
Juha Vuolle e560adef21 Add REST client convenience wrappers
[ChangeLog][QtNetwork][QRestAccessManager] Added new convenience
classes QRestAccessManager and QRestReply for typical RESTful
client application usage

Task-number: QTBUG-114637
Task-number: QTBUG-114701
Change-Id: I65057e56bf27f365b54bfd528565efd5f09386aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-12-08 15:53:33 +02:00