diff options
author | Juha Vuolle <juha.vuolle@qt.io> | 2024-01-26 12:53:34 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-01-30 03:39:40 +0000 |
commit | bd78ff024599d33cfcb411ff17727a0f4447bc7e (patch) | |
tree | 7df198b0be20e9e9bf366c7ef3730024041c4392 /src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp | |
parent | 264d54953e8b53f2454fbf8361b851923b8115a5 (diff) |
Rename QRestReply data accessors as read* functions
This naming should make it clearer that (successful) calls to
readJson(), readBody(), and readText() consume the data received
so far.
Resulted from API-review
Pick-to: 6.7
Change-Id: I09ca9eac598f8fc83eecb72c22431ac35b966bf5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp')
-rw-r--r-- | src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp b/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp index e2a28d6b31..56f18beff6 100644 --- a/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp +++ b/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp @@ -31,7 +31,7 @@ manager->post(request, myJson, this, [this](QRestReply &reply) { if (!reply.isSuccess()) { // ... } - if (std::optional json = reply.json()) { + if (std::optional json = reply.readJson()) { // use *json } }); @@ -42,7 +42,7 @@ manager->post(request, myJson, this, [this](QRestReply &reply) { manager->get(request, this, [this](QRestReply &reply) { if (!reply.isSuccess()) // handle error - if (std::optional json = reply.json()) + if (std::optional json = reply.readJson()) // use *json }); //! [3] |