add PATCH and add option to enforce a http request body write (#195)

* add PATCH and add option to enforce a http request body write

* remove private bool prop
This commit is contained in:
Liz3
2020-05-05 16:38:55 +02:00
committed by GitHub
parent 2786631e3b
commit 8760c87635
2 changed files with 8 additions and 3 deletions

View File

@ -51,7 +51,7 @@ namespace ix
const std::string& body,
HttpRequestArgsPtr args,
int redirects = 0);
void setForceBody(bool value);
// Async API
HttpRequestArgsPtr createRequest(const std::string& url = std::string(),
const std::string& verb = HttpClient::kGet);
@ -78,15 +78,16 @@ namespace ix
const static std::string kHead;
const static std::string kDel;
const static std::string kPut;
const static std::string kPatch;
private:
void log(const std::string& msg, HttpRequestArgsPtr args);
bool gzipInflate(const std::string& in, std::string& out);
bool _forceBody;
// Async API background thread runner
void run();
// Async API
bool _async;
std::queue<std::pair<HttpRequestArgsPtr, OnResponseCallback>> _queue;