Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
36 lines
901 B
C++
36 lines
901 B
C++
#ifndef RAGNAROK_SOURCE_NETWORK_HTTP_CURLPOSTHANDER_H
|
|
#define RAGNAROK_SOURCE_NETWORK_HTTP_CURLPOSTHANDER_H
|
|
|
|
#include "Network/Http/CURLMgr.h"
|
|
|
|
#include <cstddef>
|
|
#include <string>
|
|
|
|
class CCURLPostHander {
|
|
public:
|
|
explicit CCURLPostHander(std::string url);
|
|
virtual ~CCURLPostHander();
|
|
int AddField(std::string name, std::string value, int type);
|
|
int Perform();
|
|
long ResponseCode();
|
|
|
|
std::string Response() const;
|
|
|
|
protected:
|
|
/* 0004 */ bool m_enabled;
|
|
/* 0008 */ std::string m_url;
|
|
/* 0020 */ curl_slist* m_headers;
|
|
/* 0024 */ curl_httppost* m_last;
|
|
/* 0028 */ curl_httppost* m_form;
|
|
/* 002C */ void* m_easy;
|
|
/* 0030 */ std::string m_response;
|
|
|
|
private:
|
|
static std::size_t __cdecl WriteResponse(char* data, std::size_t size, std::size_t count, std::string* response);
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CCURLPostHander) == 72);
|
|
#endif
|
|
|
|
#endif
|