mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Common: Add HttpRequest to simplify HTTP requests
Too much boilerplate that is duplicated if we use curl directly. Let's add a simple wrapper class that hides the implementation details and just allows to simply make HTTP requests and get responses.
This commit is contained in:
@ -11,12 +11,11 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/HttpRequest.h"
|
||||
|
||||
// Utilities for analytics reporting in Dolphin. This reporting is designed to
|
||||
// provide anonymous data about how well Dolphin performs in the wild. It also
|
||||
@ -179,7 +178,8 @@ public:
|
||||
void Send(std::string report) override;
|
||||
|
||||
protected:
|
||||
CURL* m_curl = nullptr;
|
||||
std::string m_endpoint;
|
||||
HttpRequest m_http;
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user