memgraph/api/resources/animal.hpp
2015-10-08 00:58:29 +02:00

24 lines
507 B
C++

#ifndef MEMGRAPH_ANIMAL_HPP
#define MEMGRAPH_ANIMAL_HPP
#include "speedy/speedy.hpp"
#include "api/restful/resource.hpp"
class Animal : public api::Resource<Animal, api::GET, api::POST>
{
public:
Animal(speedy::Speedy& app) : Resource(app, "/animal") {}
void get(http::Request& req, http::Response& res)
{
return res.send("Ok, here is a Dog");
}
void post(http::Request& req, http::Response& res)
{
return res.send("Oh, you gave me an animal?");
}
};
#endif