AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
curlClient.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 "inc/rest/clientIface.hpp"
23
24#include <curl/curl.h>
25
26namespace anch::rest {
27
38
39 // Attributes +
40 private:
42 CURL* _curl;
43 // Attributes -
44
45 // Constructors +
46 public:
51 // Constructors -
52
53 // Destructor +
54 public:
58 virtual ~CURLClient();
59 // Destructor -
60
61 // Methods +
62 public:
70 virtual anch::rest::Response GET(const anch::rest::Request& request) override;
71
79 virtual anch::rest::Response GET(const std::string& path) override;
80
88 virtual anch::rest::Response POST(const anch::rest::Request& request) override;
89
97 virtual anch::rest::Response PUT(const anch::rest::Request& request) override;
98
106 virtual anch::rest::Response PATCH(const anch::rest::Request& request) override;
107
115 virtual anch::rest::Response DELETE(const anch::rest::Request& request) override;
116
124 virtual anch::rest::Response DELETE(const std::string& path) override;
125
133 virtual anch::rest::Response HEAD(const anch::rest::Request& request) override;
134
142 virtual anch::rest::Response HEAD(const std::string& path) override;
143
151 virtual anch::rest::Response OPTIONS(const anch::rest::Request& request) override;
152
160 virtual anch::rest::Response OPTIONS(const std::string& path) override;
161
169 virtual anch::rest::Response CONNECT(const anch::rest::Request& request) override;
170
178 virtual anch::rest::Response CONNECT(const std::string& path) override;
179
180
188 virtual anch::rest::Response TRACE(const std::string& path) override;
189 // Methods -
190
191 };
192
193} // anch::rest
virtual anch::rest::Response CONNECT(const anch::rest::Request &request) override
virtual anch::rest::Response PUT(const anch::rest::Request &request) override
virtual anch::rest::Response HEAD(const std::string &path) override
virtual anch::rest::Response PATCH(const anch::rest::Request &request) override
virtual anch::rest::Response CONNECT(const std::string &path) override
virtual anch::rest::Response OPTIONS(const std::string &path) override
virtual anch::rest::Response DELETE(const anch::rest::Request &request) override
virtual anch::rest::Response GET(const std::string &path) override
virtual anch::rest::Response GET(const anch::rest::Request &request) override
virtual anch::rest::Response POST(const anch::rest::Request &request) override
virtual anch::rest::Response HEAD(const anch::rest::Request &request) override
virtual anch::rest::Response DELETE(const std::string &path) override
virtual anch::rest::Response TRACE(const std::string &path) override
virtual anch::rest::Response OPTIONS(const anch::rest::Request &request) override
HTTP client interface.
Definition clientIface.hpp:38
HTTP request.
Definition request.hpp:43
HTTP response.
Definition response.hpp:45