From 7fbcd0e3d98a518e57990ea11e92ed88278d311c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Mon, 1 May 2017 19:05:31 +0200 Subject: [PATCH] remove unused file --- toREST/include/resource.hpp | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 toREST/include/resource.hpp diff --git a/toREST/include/resource.hpp b/toREST/include/resource.hpp deleted file mode 100644 index f0834aa..0000000 --- a/toREST/include/resource.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _TOREST_RESOURCE_HPP_ -#define _TOREST_RESOURCE_HPP_ - -#include - -class resource_base { - friend std::ostream& operator<<(std::ostream& os,const resource_base& rs) - { os << rs.json_response; return os; } -public: - virtual ~resource_base(){} - /// GET Read 200 (OK), list of customers. Use pagination, sorting and filtering to navigate big lists. 200 (OK), single customer. 404 (Not Found), if ID not found or invalid. - virtual void get(nlohmann::json data=nullptr){} - /// PATCH Update/Modify 404 (Not Found), unless you want to modify the collection itself. 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid. - virtual void patch(nlohmann::json data=nullptr){} - /// POST Create 201 (Created), 'Location' header with link to /customers/{id} containing new ID. 404 (Not Found), 409 (Conflict) if resource already exists.. - virtual void post(nlohmann::json data=nullptr){} - /// DELETE Delete 404 (Not Found), unless you want to delete the whole collection—not often desirable. 200 (OK). 404 (Not Found), if ID not found or invalid. - virtual void del(nlohmann::json data=nullptr){} - /// PUT Update/Replace 404 (Not Found), unless you want to update/replace every resource in the entire collection. 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid. - virtual void put(nlohmann::json data=nullptr){} - /// get a reference to the underlying JSON response - http::response& get_response(){ return json_response; } -protected: - http::response json_response; -}; - -#endif // _TOREST_RESOURCE_HPP_