AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
clientIface.hpp
1/*
2 ANCH Framework: ANother C++ Hack is a C++ framework based on C++11 standard
3 Copyright (C) 2020 Vincent Lachenal
4
5 This file is part of ANCH Framework.
6
7 ANCH Framework is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 ANCH Framework is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with ANCH Framework. If not, see <http://www.gnu.org/licenses/>.
19*/
20#pragma once
21
22#include <string>
23
24#include "rest/request.hpp"
25#include "rest/response.hpp"
26
27namespace anch::rest {
28
39
40 public:
48 virtual anch::rest::Response GET(const anch::rest::Request& request) = 0;
49
57 virtual anch::rest::Response GET(const std::string& path) = 0;
58
66 virtual anch::rest::Response POST(const anch::rest::Request& request) = 0;
67
75 virtual anch::rest::Response PUT(const anch::rest::Request& request) = 0;
76
84 virtual anch::rest::Response PATCH(const anch::rest::Request& request) = 0;
85
93 virtual anch::rest::Response DELETE(const anch::rest::Request& request) = 0;
94
102 virtual anch::rest::Response DELETE(const std::string& path) = 0;
103
111 virtual anch::rest::Response HEAD(const anch::rest::Request& request) = 0;
112
120 virtual anch::rest::Response HEAD(const std::string& path) = 0;
121
130
138 virtual anch::rest::Response OPTIONS(const std::string& path) = 0;
139
148
156 virtual anch::rest::Response CONNECT(const std::string& path) = 0;
157
158
166 virtual anch::rest::Response TRACE(const std::string& path) = 0;
167
168 };
169
170} // anch::rest
HTTP client interface.
Definition clientIface.hpp:38
virtual anch::rest::Response POST(const anch::rest::Request &request)=0
virtual anch::rest::Response DELETE(const std::string &path)=0
virtual anch::rest::Response DELETE(const anch::rest::Request &request)=0
virtual anch::rest::Response OPTIONS(const anch::rest::Request &request)=0
virtual anch::rest::Response HEAD(const std::string &path)=0
virtual anch::rest::Response HEAD(const anch::rest::Request &request)=0
virtual anch::rest::Response PATCH(const anch::rest::Request &request)=0
virtual anch::rest::Response CONNECT(const std::string &path)=0
virtual anch::rest::Response PUT(const anch::rest::Request &request)=0
virtual anch::rest::Response TRACE(const std::string &path)=0
virtual anch::rest::Response OPTIONS(const std::string &path)=0
virtual anch::rest::Response CONNECT(const anch::rest::Request &request)=0
virtual anch::rest::Response GET(const std::string &path)=0
virtual anch::rest::Response GET(const anch::rest::Request &request)=0
HTTP request.
Definition request.hpp:43
HTTP response.
Definition response.hpp:45