diff --git a/apps/main.c b/apps/main.c index 4bf85e2..0f09d9b 100644 --- a/apps/main.c +++ b/apps/main.c @@ -5,7 +5,7 @@ int main(void) { printf("Hello, world!\n"); - requestInit(); - requestGet("https://google.com"); - requestCleanup(); + requestsInit(); + requestsGet("https://google.com"); + requestsCleanup(); } \ No newline at end of file diff --git a/include/requests.h b/include/requests.h index 37838f2..58ea477 100644 --- a/include/requests.h +++ b/include/requests.h @@ -17,7 +17,7 @@ struct GetRequestResult { void requestsInit(void); void requestsCleanup(void); -GetRequestResult requestGet(const char* url); +GetRequestResult requestsGet(const char* url); size_t _getRequestCb(char *buffer, size_t size, size_t nmemb, GetRequestResult *result); diff --git a/src/requests.c b/src/requests.c index 35e6aec..d05c7af 100644 --- a/src/requests.c +++ b/src/requests.c @@ -14,7 +14,7 @@ void requestsCleanup(void) { curl_global_cleanup(); } -GetRequestResult requestGet(const char* url) { +GetRequestResult requestsGet(const char* url) { printf("requestGet(%s)\n", url); GetRequestResult result = { diff --git a/tests/test_requests.cpp b/tests/test_requests.cpp index bfd1501..4abe12e 100644 --- a/tests/test_requests.cpp +++ b/tests/test_requests.cpp @@ -7,7 +7,7 @@ TEST(RequestsTest, HttpsGetTest) { requestsInit(); std::string expected = "\n\n\nBen Shiller"; for (int i = 0; i < 10; ++i) { - GetRequestResult result = requestGet("https://shillerben.com"); + GetRequestResult result = requestsGet("https://shillerben.com"); // std::cout << "GET https://shillerben.com returned: " << result.data << '\n'; ASSERT_EQ(strncmp(result.data, expected.c_str(), expected.size()), 0); free(result.data);