#pragma once

class CNetwork : public IBaseCurl
{
public:
	CNetwork();
	~CNetwork(void);

	void SetUrl(LPCSTR url);

	HTTPRET PostLogin(LPCSTR username, LPCSTR password,LPCSTR& data);

	HTTPRET GetHttpConnectstatus();
 
	LPCSTR  GetLastErrorA();
	LPCWSTR  GetLastErrorW();

private:
	std::string GetUrl(std::string path, std::vector<cpr::Parameter> parame);
	std::string PostUrl(std::string path, std::vector<cpr::Pair> parame);
	void Init();
	void UnInit();
private:

	std::vector<std::string> vectorBaseurl;

	std::unordered_map<std::string, std::string> keymap;

	std::string m_error_msg;

	HTTPRET m_http_ret;

	int m_http_status;

	std::string m_url;

};

