基本通信测试通过。
This commit is contained in:
27
bf.request.h
Normal file
27
bf.request.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef BF_REQUEST_H
|
||||
#define BF_REQUEST_H
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "bf.interface.h"
|
||||
#include "bf.util.h"
|
||||
#include "bf.config.h"
|
||||
|
||||
class BF_Request : public BF_Interface
|
||||
{
|
||||
public:
|
||||
BF_Request();
|
||||
~BF_Request() override;
|
||||
|
||||
public:
|
||||
std::string getResult(const std::string& url) override;
|
||||
std::string doReady(const std::string& words, const std::string& from, const std::string& to) override;
|
||||
|
||||
private:
|
||||
static size_t writeData(void* buffer, size_t size, size_t nmemb, std::string* str);
|
||||
|
||||
private:
|
||||
CURL* curl_{};
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user