Move rest stuff into nap subdir.
Nap is a quick REST. Silly joke really, but hey, 3 letters. Great namespace name.
This commit is contained in:
parent
05c03c2daf
commit
c4935ac70d
5 changed files with 11 additions and 11 deletions
|
@ -103,8 +103,8 @@ executable(meson.project_name(),
|
|||
'eventia/event.cpp',
|
||||
'timer_oro_api.cpp',
|
||||
'oro/originsdb.cpp',
|
||||
'oro/page_fetch.cpp',
|
||||
'oro/http_header_parse.cpp',
|
||||
'nap/page_fetch.cpp',
|
||||
'nap/http_header_parse.cpp',
|
||||
project_config_file,
|
||||
install: true,
|
||||
dependencies: lib_deps,
|
||||
|
|
|
@ -30,11 +30,11 @@ struct is_range<std::basic_string_view<Char, Trait>> : boost::mpl::true_ {};
|
|||
|
||||
} //namespace boost::spirit::x3::traits
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(oro::ParsedHeader,
|
||||
BOOST_FUSION_ADAPT_STRUCT(nap::ParsedHeader,
|
||||
version, code, message, fields
|
||||
);
|
||||
|
||||
namespace oro {
|
||||
namespace nap {
|
||||
namespace {
|
||||
namespace parser {
|
||||
//HTTP/1.1 200 OK
|
||||
|
@ -112,4 +112,4 @@ ParsedHeader header_parse (std::string_view text) {
|
|||
return retval;
|
||||
}
|
||||
|
||||
} //namespace oro
|
||||
} //namespace nap
|
|
@ -24,7 +24,7 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
namespace oro {
|
||||
namespace nap {
|
||||
namespace {
|
||||
bool is_https (std::string_view parUrl) {
|
||||
const char protocol[] = "https://";
|
||||
|
@ -77,4 +77,4 @@ HttpResponse page_fetch (std::string_view url, std::string_view user_agent) {
|
|||
resp.code_desc = parsed_header.message;
|
||||
return resp;
|
||||
}
|
||||
} //namespace oro
|
||||
} //namespace nap
|
|
@ -21,7 +21,7 @@
|
|||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace oro {
|
||||
namespace nap {
|
||||
struct ParsedHeader {
|
||||
std::string_view version;
|
||||
unsigned int code;
|
||||
|
@ -30,4 +30,4 @@ struct ParsedHeader {
|
|||
};
|
||||
|
||||
ParsedHeader header_parse (std::string_view text);
|
||||
} //namespace oro
|
||||
} //namespace nap
|
|
@ -22,7 +22,7 @@
|
|||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace oro {
|
||||
namespace nap {
|
||||
struct HttpResponse {
|
||||
std::string raw;
|
||||
std::vector<std::pair<std::string_view, std::string_view>> header;
|
||||
|
@ -33,4 +33,4 @@ struct HttpResponse {
|
|||
};
|
||||
|
||||
HttpResponse page_fetch (std::string_view url, std::string_view user_agent);
|
||||
} //namespace oro
|
||||
} //namespace nap
|
Loading…
Reference in a new issue