37 void SetUrl(std::string_view url) { _url = url; }
65 void SetHeader(
const std::vector<std::string>& vec_header)
67 _vecHeader = vec_header;
69 std::vector<std::string>
GetHeader() {
return _vecHeader; }
73 std::string
GetUrl() {
return _url; }
89 std::vector<std::string> _vecHeader;
142 if (
_data.is_string())
146 return fmt::format(
"{},{}({})",
_msg, d,
_code);
150 std::string _pathCACert;
151 bool _bShowResultLog;
void SetDataSend(const json &j)
std::vector< std::string > GetHeader()
void SetUrl(std::string_view url)
Buffer & GetDataRecvRef()
void SetDataSend(std::string_view str)
std::function< void(void)> FnCallback
void SetDataSend(BufferView buf)
void SetHeader(const std::vector< std::string > &vec_header)
bool SendRequest(Request &request)
void SetShowResultLog(bool show)
Buffer ExDownload(std::string_view url)
下载文件
void SetCACertPath(std::string_view str)
json Parse(BufferView buf, bool binary=false)
从 内存 构建json对象
bool Get(const json &j, const std::string &name, T &t)
从json返回子元素值,不存在则返回false,打印日志
Buffer CreateBuffer(BufferView buf)
创建副本
BufferView CreateBufferView(const Buffer &buf)
创建buffer视图(右值不能默认转换)