aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/curl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking/curl')
-rw-r--r--backends/networking/curl/curlrequest.h3
-rw-r--r--backends/networking/curl/networkreadstream.cpp2
-rw-r--r--backends/networking/curl/networkreadstream.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/backends/networking/curl/curlrequest.h b/backends/networking/curl/curlrequest.h
index 5677720b1d..f77dce92c0 100644
--- a/backends/networking/curl/curlrequest.h
+++ b/backends/networking/curl/curlrequest.h
@@ -64,6 +64,9 @@ public:
* @return its NetworkReadStream in NetworkReadStreamResponse.
*/
virtual NetworkReadStreamResponse execute();
+
+ /** Returns Request's NetworkReadStream. */
+ const NetworkReadStream *getNetworkReadStream() const { return _stream; }
};
} //end of namespace Networking
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index 39316deb7c..8658fc7d17 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -78,7 +78,7 @@ void NetworkReadStream::finished() {
_requestComplete = true;
}
-long NetworkReadStream::httpResponseCode() {
+long NetworkReadStream::httpResponseCode() const {
long responseCode = -1;
if (_easy)
curl_easy_getinfo(_easy, CURLINFO_RESPONSE_CODE, &responseCode);
diff --git a/backends/networking/curl/networkreadstream.h b/backends/networking/curl/networkreadstream.h
index a0c87460cb..14c00a4baa 100644
--- a/backends/networking/curl/networkreadstream.h
+++ b/backends/networking/curl/networkreadstream.h
@@ -80,7 +80,7 @@ public:
*
* @note This method should be called when eos() == true.
*/
- long httpResponseCode();
+ long httpResponseCode() const;
};
} //end of namespace Networking