Update Http Library

This commit is contained in:
2020-06-14 16:38:25 +02:00
parent b01fdb8be8
commit ec5df791b4
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ Image::JpegImage FoscamRecorder::Snapshot(Http::HttpClient* pHttpClient, const S
try try
{ {
image.SetImageData(pHttpClient->GetUrlContents(url.str())); Http::HttpRequest request(url.str());
image.SetImageData(pHttpClient->Open(request));
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {
+2 -1
View File
@@ -93,7 +93,8 @@ void VStarCamRecorder::Snapshot(Http::HttpClient* pHttpClient, const Settings& s
try try
{ {
std::ofstream file(fileName.str()); std::ofstream file(fileName.str());
file << pHttpClient->GetUrlContents(url.str()); Http::HttpRequest request(url.str());
file << pHttpClient->Open(request);
file.close(); file.close();
} }
catch (const std::exception& e) catch (const std::exception& e)
+2 -1
View File
@@ -101,7 +101,8 @@ Image::JpegImage WatchBotRecorder::Snapshot(Http::HttpClient* pHttpClient, const
try try
{ {
image.SetImageData(pHttpClient->GetUrlContents(url.str())); Http::HttpRequest request(url.str());
image.SetImageData(pHttpClient->Open(request));
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {