#ifndef _HTTP_CLIENT_H_
#define _HTTP_CLIENT_H_

#include <iostream>
#include "cJSON.h"
using namespace std;

class HttpClient
{
public:
	HttpClient(void);
	~HttpClient(void);

private:
	bool debugVerbose = false;
	string clientCert;
	string clientKey;
	string token;
	string deviceSn;
	void desensitizeReport(cJSON* obj);

public:
	bool post(string url, string postParams, string& response);
	bool get(string url, string& response);

	bool setClientCert(string& cert);
	bool setClientKey(string& key);

	bool setToken(string token);
	bool setDeviceSn(string diviceSn);
};

#endif // !_HTTP_CLIENT_H_

