Colorpaletteclient is able to interface two server backends: public
reqres.in service and QHttpServer example service. The public reqres.in
service has recently started requiring an api-key HTTP header (see
https://reqres.in/signup).
This commit adds an api-key header if the app uses the public
reqres.in service. The header is added to the QNetworkRequestFactory
and is consequently then used in all subsequent requests.
The code is furthermore adjusted so that it won't accidentally
remove the api-key when toggling another proprietary header ("token").
Pick-to: 6.9 6.8
Fixes: QTBUG-136790
Change-Id: Id19d223722fd8f735d76855a293bc77f680ed344
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Use include style that is consistent with rest of the
application. The include style was a leftover from the times the
application itself defined "restaccessmanager.h". Since Qt 6.7
the qrestaccessmanager.h is a proper QtNetwork class header.
Pick-to: 6.9 6.8
Change-Id: I25c1103ed9ccef1aa1da86475a1e20d9dba76a3b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
Change '* ' into ' *', and '& ' into ' &'
Pick-to: 6.7
Change-Id: I29223b069d92f67195405fa88795469a6cc767a0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Replace the addressbook client example with a colorpalette client.
The corresponding addressbook server has been superseded by a
colorpalette server.
The client can interface the local QHttpServer colorpaletteserver
example as well as the publicly accessible reqres.in. Please note
that the reqres.in is stateless service, and eg. adding/updating colors
will have no actual effect.
Task-number: QTBUG-106041
Pick-to: 6.5
Change-Id: I4ea06bbcd9b32900a661f19e0abe0629275aaef1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>