Removed old Keep-Alive functions
This commit is contained in:
parent
abaf875c42
commit
38a7706c8b
45
httplib.h
45
httplib.h
@ -1097,51 +1097,6 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
}; // namespace httplib
|
}; // namespace httplib
|
||||||
|
|
||||||
inline void Get(std::vector<Request> &requests, const char *path,
|
|
||||||
const Headers &headers) {
|
|
||||||
Request req;
|
|
||||||
req.method = "GET";
|
|
||||||
req.path = path;
|
|
||||||
req.headers = headers;
|
|
||||||
requests.emplace_back(std::move(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Get(std::vector<Request> &requests, const char *path) {
|
|
||||||
Get(requests, path, Headers());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Post(std::vector<Request> &requests, const char *path,
|
|
||||||
const Headers &headers, const std::string &body,
|
|
||||||
const char *content_type) {
|
|
||||||
Request req;
|
|
||||||
req.method = "POST";
|
|
||||||
req.path = path;
|
|
||||||
req.headers = headers;
|
|
||||||
if (content_type) { req.headers.emplace("Content-Type", content_type); }
|
|
||||||
req.body = body;
|
|
||||||
requests.emplace_back(std::move(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Post(std::vector<Request> &requests, const char *path,
|
|
||||||
const std::string &body, const char *content_type) {
|
|
||||||
Post(requests, path, Headers(), body, content_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Post(std::vector<Request> &requests, const char *path,
|
|
||||||
size_t content_length, ContentProvider content_provider,
|
|
||||||
const char *content_type) {
|
|
||||||
Request req;
|
|
||||||
req.method = "POST";
|
|
||||||
req.headers = Headers();
|
|
||||||
req.path = path;
|
|
||||||
req.content_length = content_length;
|
|
||||||
req.content_provider = content_provider;
|
|
||||||
|
|
||||||
if (content_type) { req.headers.emplace("Content-Type", content_type); }
|
|
||||||
|
|
||||||
requests.emplace_back(std::move(req));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
||||||
class SSLServer : public Server {
|
class SSLServer : public Server {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user