aboutsummaryrefslogtreecommitdiffstats
path: root/http-client
diff options
context:
space:
mode:
Diffstat (limited to 'http-client')
-rw-r--r--http-client/http_client.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/http-client/http_client.cc b/http-client/http_client.cc
index 221e7bbe..a2e9800b 100644
--- a/http-client/http_client.cc
+++ b/http-client/http_client.cc
@@ -13,6 +13,7 @@
* limitations under the License.
*/
+#include "response.h"
#include "http_client.h"
#include <curl/curl.h>
@@ -20,9 +21,11 @@
#include <iostream>
using namespace std;
+using namespace icn_httpserver;
size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) {
- ((ostream*) stream)->write((const char*)ptr, size * nmemb);
+ ((Response*) stream)->write((const char*)ptr, size * nmemb);
+ ((Response*) stream)->send();
return size * nmemb;
}
@@ -56,4 +59,4 @@ bool HTTPClient::download(const std::string& url, std::ostream& out) {
}
return true;
-} \ No newline at end of file
+}