PIHTTPClient fixes

This commit is contained in:
2024-11-28 12:37:05 +03:00
parent 3a159b0553
commit 4f934fef35
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
#include "pihttpclient.h"
#include "pitime.h"
#include <curl/curl.h>
CurlThreadPool::CurlThreadPool() {
piForTimes(10) {
@@ -34,6 +35,7 @@ CurlThreadPool::~CurlThreadPool() {
for (auto c: *cr)
delete c;
}
curl_global_cleanup();
}

View File

@@ -167,7 +167,7 @@ PIHTTPClient * PIHTTPClient::create(const PIString & url_, PIHTTP::Method method
static_cast<PIHTTP::MessageConst &>(ret->request) = req;
ret->request.setMethod(method);
ret->reply.setMethod(method);
ret->url = url_.toPercentageEncoding();
ret->url = url_;
return ret;
}