1 Star 1 Fork 0

modory/中国象棋

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
httprequest.h 689 Bytes
一键复制 编辑 原始数据 按行查看 历史
PikaCat 提交于 4年前 . 优化代码
#pragma once
#include <string>
#include <vector>
class HttpRequest
{
public:
HttpRequest(const std::string& ip, int port);
~HttpRequest(void);
// Http GET请求
std::string HttpGet(std::string req);
// Http POST请求
std::string HttpPost(std::string req, std::string data);
// 合成JSON字符串
static std::string genJsonString(std::string key, int value);
// 分割字符串
static std::vector<std::string> split(const std::string &s, const std::string &seperator);
// 根据key从Response获取Header中的内容
static std::string getHeader(std::string respose, std::string key);
private:
std::string m_ip;
int m_port;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/modory/ChineseChess.git
git@gitee.com:modory/ChineseChess.git
modory
ChineseChess
中国象棋
master

搜索帮助