Files
lib-privatebin/include/http_client.h

47 lines
1.2 KiB
C++

#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H
#include <string>
class HttpClient {
public:
/**
* Performs an HTTP GET request
*
* @param url The URL to request
* @param response Output parameter for the response
* @return true on success, false on failure
*/
bool get(const std::string& url, std::string& response);
/**
* Performs an HTTP POST request
*
* @param url The URL to request
* @param data The data to send
* @param response Output parameter for the response
* @return true on success, false on failure
*/
bool post(const std::string& url, const std::string& data,
std::string& response);
/**
* Performs an HTTP DELETE request
*
* @param url The URL to request
* @param data The data to send
* @param response Output parameter for the response
* @return true on success, false on failure
*/
bool delete_req(const std::string& url, const std::string& data,
std::string& response);
private:
#ifdef WINDOWS
// Windows-specific implementation details
#elif LINUX
// Linux-specific implementation details
#endif
};
#endif // HTTP_CLIENT_H