New header only http library

This commit is contained in:
Anonymous-275
2021-04-04 19:20:25 +03:00
parent e70cf0f877
commit ec3bcffe7c
8 changed files with 7671 additions and 116 deletions

View File

@@ -6,21 +6,15 @@
/// Created by Anonymous275 on 7/18/2020
///
#pragma once
#include <evpp/httpc/response.h>
#include <evpp/httpc/request.h>
#include <string>
#include "Logger.h"
class HTTP{
public:
static void Response(const std::shared_ptr<evpp::httpc::Response>& response, evpp::httpc::Request* request);
static bool Download(const std::string &IP, const std::string &Path);
static std::string Post(const std::string& IP, const std::string& Fields);
static std::string Get(const std::string &IP);
static void Init(char* argv[]){
google::InitGoogleLogging(argv[0]);
google::SetStderrLogging(google::GLOG_ERROR);
evpp::httpc::SET_SSL_VERIFY_MODE(SSL_VERIFY_NONE);
}
private:
static std::string Res_;
static bool ProgressBar(size_t c, size_t t);
public:
static bool isDownload;
static std::string Codes_[];
};

7578
include/httplib.h Normal file

File diff suppressed because it is too large Load Diff