Skip to content

Commit

Permalink
Merge pull request #1111 from libcpr/feature/curl-8.10.1
Browse files Browse the repository at this point in the history
Curl 8.10.1
  • Loading branch information
COM8 committed Sep 26, 2024
1 parent 7a99171 commit 42a0c5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ else()
clear_variable(DESTINATION CMAKE_CXX_CLANG_TIDY BACKUP CMAKE_CXX_CLANG_TIDY_BKP)

FetchContent_Declare(curl
URL https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.xz
URL_HASH SHA256=16c62a9c4af0f703d28bda6d7bbf37ba47055ad3414d70dec63e2e6336f2a82d # the file hash for curl-8.4.0.tar.xz
URL https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz
URL_HASH SHA256=73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee # the file hash for curl-8.10.1.tar.xz
USES_TERMINAL_DOWNLOAD TRUE) # <---- This is needed only for Ninja to show download progress
FetchContent_MakeAvailable(curl)

Expand Down
7 changes: 7 additions & 0 deletions test/get_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ using namespace cpr;

static HttpServer* server = new HttpServer();

TEST(BasicTests, XXXTest) {
Url url{"https://getsolara.dev/api/endpoint.json"};
Response response = cpr::Get(url);
EXPECT_EQ(200, response.status_code);
EXPECT_EQ(ErrorCode::OK, response.error.code);
}

TEST(BasicTests, HelloWorldTest) {
Url url{server->GetBaseUrl() + "/hello.html"};
Response response = cpr::Get(url);
Expand Down

0 comments on commit 42a0c5f

Please sign in to comment.