2015-01-27 06:35:29 -05:00
|
|
|
#ifndef HEADER_HPP
|
|
|
|
#define HEADER_HPP
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#include <algorithm>
|
2016-05-27 15:05:04 -04:00
|
|
|
#include <string>
|
2013-12-16 05:29:38 -05:00
|
|
|
|
2022-12-11 04:10:26 -05:00
|
|
|
namespace osrm::server::http
|
2014-05-11 12:03:05 -04:00
|
|
|
{
|
2016-01-05 10:51:13 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
struct header
|
2014-05-07 10:50:48 -04:00
|
|
|
{
|
2015-01-27 06:35:29 -05:00
|
|
|
// explicitly use default copy c'tor as adding move c'tor
|
|
|
|
header &operator=(const header &other) = default;
|
2015-08-18 06:56:34 -04:00
|
|
|
header(std::string name, std::string value) : name(std::move(name)), value(std::move(value)) {}
|
2015-01-27 06:35:29 -05:00
|
|
|
header(header &&other) : name(std::move(other.name)), value(std::move(other.value)) {}
|
|
|
|
|
|
|
|
void clear()
|
|
|
|
{
|
|
|
|
name.clear();
|
|
|
|
value.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string name;
|
|
|
|
std::string value;
|
2011-01-09 16:42:27 -05:00
|
|
|
};
|
2022-12-20 12:00:11 -05:00
|
|
|
} // namespace osrm::server::http
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#endif // HEADER_HPP
|