spoof a bunch of headers like the web client

This commit is contained in:
ouwou
2022-08-11 23:37:39 -04:00
parent baf96da80c
commit dc28eae95a
9 changed files with 96 additions and 2 deletions

View File

@@ -57,6 +57,10 @@ void request::set_user_agent(const std::string &data) {
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, data.c_str());
}
CURL *request::get_curl() {
return m_curl;
}
response request::execute() {
if (m_curl == nullptr) {
auto response = detail::make_response(m_url, EStatusCode::ClientErrorCURLInit);