mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 15:17:13 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
56
vendor/CPR/include/cpr/response.h
vendored
Normal file
56
vendor/CPR/include/cpr/response.h
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
#ifndef CPR_RESPONSE_H
|
||||
#define CPR_RESPONSE_H
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <curl/curl.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "cpr/cookies.h"
|
||||
#include "cpr/cprtypes.h"
|
||||
#include "cpr/error.h"
|
||||
#include "cpr/ssl_options.h"
|
||||
#include "cpr/util.h"
|
||||
|
||||
namespace cpr {
|
||||
|
||||
class Response {
|
||||
protected:
|
||||
std::shared_ptr<CurlHolder> curl_{nullptr};
|
||||
|
||||
public:
|
||||
// Ignored here since libcurl uses a long for this.
|
||||
// NOLINTNEXTLINE(google-runtime-int)
|
||||
long status_code{};
|
||||
std::string text{};
|
||||
Header header{};
|
||||
Url url{};
|
||||
double elapsed{};
|
||||
Cookies cookies{};
|
||||
Error error{};
|
||||
std::string raw_header{};
|
||||
std::string status_line{};
|
||||
std::string reason{};
|
||||
cpr_off_t uploaded_bytes{};
|
||||
cpr_off_t downloaded_bytes{};
|
||||
// Ignored here since libcurl uses a long for this.
|
||||
// NOLINTNEXTLINE(google-runtime-int)
|
||||
long redirect_count{};
|
||||
|
||||
Response() = default;
|
||||
Response(std::shared_ptr<CurlHolder> curl, std::string&& p_text, std::string&& p_header_string,
|
||||
Cookies&& p_cookies, Error&& p_error);
|
||||
std::vector<std::string> GetCertInfo();
|
||||
Response(const Response& other) = default;
|
||||
Response(Response&& old) noexcept = default;
|
||||
~Response() noexcept = default;
|
||||
|
||||
Response& operator=(Response&& old) noexcept = default;
|
||||
Response& operator=(const Response& other) = default;
|
||||
};
|
||||
} // namespace cpr
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user