mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
it complies and crow updated
This commit is contained in:
parent
9b3a27baa9
commit
f9925d6c3b
20 changed files with 870 additions and 513 deletions
18
ext/crow/http_request.h
Normal file → Executable file
18
ext/crow/http_request.h
Normal file → Executable file
|
@ -3,6 +3,7 @@
|
|||
#include "common.h"
|
||||
#include "ci_map.h"
|
||||
#include "query_string.h"
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
namespace crow
|
||||
{
|
||||
|
@ -17,6 +18,8 @@ namespace crow
|
|||
return empty;
|
||||
}
|
||||
|
||||
struct DetachHelper;
|
||||
|
||||
struct request
|
||||
{
|
||||
HTTPMethod method;
|
||||
|
@ -27,9 +30,10 @@ namespace crow
|
|||
std::string body;
|
||||
|
||||
void* middleware_context{};
|
||||
boost::asio::io_service* io_service{};
|
||||
|
||||
request()
|
||||
: method(HTTPMethod::GET)
|
||||
: method(HTTPMethod::Get)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -48,5 +52,17 @@ namespace crow
|
|||
return crow::get_header_value(headers, key);
|
||||
}
|
||||
|
||||
template<typename CompletionHandler>
|
||||
void post(CompletionHandler handler)
|
||||
{
|
||||
io_service->post(handler);
|
||||
}
|
||||
|
||||
template<typename CompletionHandler>
|
||||
void dispatch(CompletionHandler handler)
|
||||
{
|
||||
io_service->dispatch(handler);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue