Skip to content

Commit

Permalink
Tracking/LiveTrack24/Client: enable CURLOPT_FAILONERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 2, 2021
1 parent c23aae8 commit 0a82e75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Tracking/LiveTrack24/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Client::GetUserID(const TCHAR *username, const TCHAR *password)
// Request the file
CurlEasy easy(url);
Curl::Setup(easy);
easy.SetFailOnError();

const auto response = co_await Curl::CoRequest(curl, std::move(easy));
const char *body = response.body.c_str();
Expand Down Expand Up @@ -150,6 +151,7 @@ Client::SendRequest(const char *url)
{
CurlEasy easy(url);
Curl::Setup(easy);
easy.SetFailOnError();

const auto _response = co_await Curl::CoRequest(curl, std::move(easy));
StringView response{std::string_view{_response.body}};
Expand Down

0 comments on commit 0a82e75

Please sign in to comment.