2015-09-19 01:49:23 +08:00
|
|
|
#ifndef MEMGRAPH_SPEEDY_HPP
|
|
|
|
#define MEMGRAPH_SPEEDY_HPP
|
|
|
|
|
2015-09-20 20:30:26 +08:00
|
|
|
#include "io/uv/uv.hpp"
|
2015-09-19 01:49:23 +08:00
|
|
|
#include "http/http.hpp"
|
|
|
|
|
|
|
|
namespace speedy
|
|
|
|
{
|
|
|
|
|
|
|
|
class Speedy
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
http::HttpServer server;
|
|
|
|
http::Ipv4 ip;
|
|
|
|
public:
|
2015-09-20 20:30:26 +08:00
|
|
|
Speedy(uv::UvLoop& loop, const http::Ipv4& ip);
|
2015-09-19 01:49:23 +08:00
|
|
|
void get(const std::string path, http::request_cb_t callback);
|
|
|
|
void listen();
|
|
|
|
~Speedy();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "speedy.inl"
|
|
|
|
|
|
|
|
#endif
|