Implement very simple HTTP streaming to handle etcd watches
This commit is contained in:
+4
-2
@@ -6,12 +6,14 @@
|
||||
|
||||
struct http_response_t
|
||||
{
|
||||
int status_code;
|
||||
bool eof = false;
|
||||
int error_code = 0;
|
||||
int status_code = 0;
|
||||
std::string status_line;
|
||||
std::map<std::string, std::string> headers;
|
||||
std::string body;
|
||||
};
|
||||
|
||||
http_response_t *parse_http_response(std::string res);
|
||||
void parse_headers(std::string & res, http_response_t *parsed);
|
||||
std::vector<std::string> getifaddr_list(bool include_v6 = false);
|
||||
uint64_t stoull_full(const std::string & str, int base = 10);
|
||||
|
||||
Reference in New Issue
Block a user