Skip to content

Files

Latest commit

86a6b69 · Jul 31, 2021

History

History
29 lines (21 loc) · 640 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 640 Bytes

curl4cpp

single header cURL wrapper for C++ around libcURL.

An example:

#include <iostream>
#include <string>
#include "curl4.hpp"

int main() {
    curl4::CURL4 init = curl4::easy::init();

    {
        std::string val;

        init.setopt(CURLOPT_URL, "https://raw.githubusercontent.com/ferhatgec/bufsize/master/example.cpp");
        init.setopt(CURLOPT_WRITEFUNCTION, curl4::easy::writefunc);
        init.setopt(CURLOPT_WRITEDATA, &val);
        
        CURLcode res = curl4::easy::perform(init);

        std::cout << val << '\n';
    }

    return 0;
}

curl4cpp licensed under the terms of MIT License.