mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Modernize some additional code
This commit is contained in:
parent
c652919954
commit
a62a48a7b5
11
httplib.h
11
httplib.h
@ -473,11 +473,10 @@ private:
|
|||||||
|
|
||||||
class Server {
|
class Server {
|
||||||
public:
|
public:
|
||||||
typedef std::function<void(const Request &, Response &)> Handler;
|
using Handler = std::function<void(const Request &, Response &)>;
|
||||||
typedef std::function<void(const Request &, Response &,
|
using HandlerWithContentReader = std::function<void(const Request &, Response &,
|
||||||
const ContentReader &content_reader)>
|
const ContentReader &content_reader)>;
|
||||||
HandlerWithContentReader;
|
using Logger = std::function<void(const Request &, const Response &)>;
|
||||||
typedef std::function<void(const Request &, const Response &)> Logger;
|
|
||||||
|
|
||||||
Server();
|
Server();
|
||||||
|
|
||||||
@ -576,7 +575,7 @@ private:
|
|||||||
|
|
||||||
class Client {
|
class Client {
|
||||||
public:
|
public:
|
||||||
Client(const char *host, int port = 80, time_t timeout_sec = 300);
|
explicit Client(const char *host, int port = 80, time_t timeout_sec = 300);
|
||||||
|
|
||||||
virtual ~Client();
|
virtual ~Client();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user