Skip to content

Commit

Permalink
simplified with namespace alias (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Nov 2, 2023
1 parent 29e542c commit 47925f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
11 changes: 1 addition & 10 deletions include/ylt/coro_http/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,4 @@

#include <cinatra/coro_http_client.hpp>

namespace coro_http {
using coro_http_client = cinatra::coro_http_client;
using req_content_type = cinatra::req_content_type;
using resp_data = cinatra::resp_data;
using http_method = cinatra::http_method;
using http_header = cinatra::http_header;
using uri_t = cinatra::uri_t;
template <typename String = std::string>
using req_context = cinatra::req_context<String>;
} // namespace coro_http
namespace coro_http = cinatra;
22 changes: 1 addition & 21 deletions include/ylt/coro_http/coro_http_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,4 @@

#include <cinatra/coro_http_server.hpp>

namespace coro_http {
using coro_http_server = cinatra::coro_http_server;
using coro_http_request = cinatra::coro_http_request;
using coro_http_response = cinatra::coro_http_response;
using status_type = cinatra::status_type;
using http_method = cinatra::http_method;
using uri_t = cinatra::uri_t;
using req_content_type = cinatra::req_content_type;

constexpr inline auto GET = cinatra::http_method::GET;
constexpr inline auto POST = cinatra::http_method::POST;
constexpr inline auto DEL = cinatra::http_method::DEL;
constexpr inline auto HEAD = cinatra::http_method::HEAD;
constexpr inline auto PUT = cinatra::http_method::PUT;
constexpr inline auto CONNECT = cinatra::http_method::CONNECT;
#ifdef TRACE
#undef TRACE
constexpr inline auto TRACE = cinatra::http_method::TRACE;
#endif
constexpr inline auto OPTIONS = cinatra::http_method::OPTIONS;
} // namespace coro_http
namespace coro_http = cinatra;

0 comments on commit 47925f5

Please sign in to comment.