net-cpp: /home/odroid/lomiri/net-cpp-git/src/net-cpp/include/core/net/http/response.h Source File

net-cpp .. C++11 library for networking purposes

response.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 */
18 #ifndef CORE_NET_HTTP_RESPONSE_H_
19 #define CORE_NET_HTTP_RESPONSE_H_
20
21 #include <core/net/visibility.h>
22
23 #include <core/net/http/header.h>
24 #include <core/net/http/status.h>
25
26 #include <map>
27 #include <sstream>
28 #include <string>
29
30 namespace core
31 {
32 namespace net
33 {
34 namespace http
35 {
39 struct CORE_NET_DLL_PUBLIC Response
40 {
41 // TODO(tvoss): This really should be a stringstream, but libstdc++ is broken and
42 // does not define move operators correctly.
44 typedef std::string Body;
45
47 Status status{Status::bad_request};
49 Header header{};
51 Body body{};
52 };
53 }
54 }
55 }
56
57 #endif // CORE_NET_HTTP_RESPONSE_H_
visibility.h
core::net::http::Response::Body
std::string Body
The body of the response is a string.
Definition: response.h:44
core::net::http::Header
The Header class encapsulates the headers of an HTTP request/response.
Definition: header.h:39
core::net::http::Response
The Response struct models a response to a core::net::http::Request.
Definition: response.h:40
core
Definition: location.h:24
CORE_NET_DLL_PUBLIC
#define CORE_NET_DLL_PUBLIC
Definition: visibility.h:25
core::net::http::Status
Status
Definition: status.h:32
status.h
header.h