Make it build again
This commit is contained in:
parent
cf9e6955e8
commit
38eac9e9dc
|
@ -5,7 +5,7 @@
|
|||
|
||||
int main(void) {
|
||||
printf("Hello, world!\n");
|
||||
requestInit();
|
||||
requestGet("https://google.com");
|
||||
requestCleanup();
|
||||
requestsInit();
|
||||
requestsGet("https://google.com");
|
||||
requestsCleanup();
|
||||
}
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -7,7 +7,7 @@ TEST(RequestsTest, HttpsGetTest) {
|
|||
requestsInit();
|
||||
std::string expected = "<!DOCTYPE html>\n<html >\n<head><meta charset=\"utf-8\">\n<title>Ben Shiller</title>";
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user