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
25
26#include <map>
27#include <sstream>
28#include <string>
29
30namespace core
31{
32namespace net
33{
34namespace http
35{
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_
The Header class encapsulates the headers of an HTTP request/response.
Definition header.h:39
The Response struct models a response to a core::net::http::Request.
Definition response.h:40
std::string Body
The body of the response is a string.
Definition response.h:44
#define CORE_NET_DLL_PUBLIC
Definition visibility.h:25