28 lines
473 B
C++
28 lines
473 B
C++
|
//
|
||
|
// requester.hpp
|
||
|
// curly
|
||
|
//
|
||
|
// Created by Bob Polis at 2020-09-01
|
||
|
// Copyright (c) 2020 SwiftCoder. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#ifndef _requester_H_
|
||
|
#define _requester_H_
|
||
|
|
||
|
#include <string>
|
||
|
#include <curl/curl.h>
|
||
|
|
||
|
class requester {
|
||
|
public:
|
||
|
static size_t write_data(char* buf, size_t sz, size_t nmemb, void* user_data);
|
||
|
|
||
|
requester();
|
||
|
|
||
|
std::string get(const std::string& url);
|
||
|
|
||
|
private:
|
||
|
CURL* _h;
|
||
|
};
|
||
|
|
||
|
#endif // _requester_H_
|