Saves URIs of things you want to remember in a database.
Go to file
tastytea 54afa6babf Squashed 'src/curl_wrapper/' content from commit 5af456a
git-subtree-dir: src/curl_wrapper
git-subtree-split: 5af456a18b84805e0b65c187512d6810ec7961e9
2020-11-13 21:27:54 +01:00
cmake Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
src Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
tests Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
.clang-format Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
.editorconfig Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
.gitignore Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
CMakeLists.txt Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
LICENSE Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00
README.adoc Squashed 'src/curl_wrapper/' content from commit 5af456a 2020-11-13 21:27:54 +01:00

README.adoc

curl_wrapper

Light libcurl wrapper for when you need to GET a website with minimum effort.

This is not supposed to be a package on its own, but a thing you drop into your project.

I made this because the curl wrapper I used before is no longer maintained and the other wrappers are either incomplete or unmaintained as well. I do not guarantee anything, use at your own risk.

Example program

#include "curl_wrapper.hpp"
#include <iostream>

namespace cw = curl_wrapper;

int main()
{
    cw::CURLWrapper curl;
    const auto answer{curl.make_http_request(cw::http_method::GET,
                                             "http://example.com/")};
    if (answer)
    {
        std::cout << answer;
    }
}

Use with CMake

Drop this project into a subfolder in your project tree. It will be compiled as a static library.

add_subdirectory(curl_wrapper)

add_executable(test)
target_link_libraries(test PRIVATE curl_wrapper)
CMake options:
  • -DWITH_CURL_WRAPPER_TESTS=YES Compiles the tests.

  • -DWITH_CURL_WRAPPER_DOC=YES Generate API reference.

Dependencies