You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
638 B
C
29 lines
638 B
C
![]()
7 years ago
|
#ifndef WEBCC_REST_REQUEST_HANDLER_H_
|
||
|
#define WEBCC_REST_REQUEST_HANDLER_H_
|
||
|
|
||
|
// HTTP server handling REST requests.
|
||
|
|
||
![]()
7 years ago
|
#include <string>
|
||
|
|
||
![]()
7 years ago
|
#include "webcc/http_request_handler.h"
|
||
|
#include "webcc/rest_service_manager.h"
|
||
|
|
||
|
namespace webcc {
|
||
|
|
||
|
class RestRequestHandler : public HttpRequestHandler {
|
||
![]()
7 years ago
|
public:
|
||
![]()
7 years ago
|
RestRequestHandler() = default;
|
||
![]()
7 years ago
|
~RestRequestHandler() override = default;
|
||
|
|
||
![]()
7 years ago
|
bool Bind(RestServicePtr service, const std::string& url, bool is_regex);
|
||
![]()
7 years ago
|
|
||
![]()
7 years ago
|
private:
|
||
![]()
7 years ago
|
void HandleConnection(HttpConnectionPtr connection) override;
|
||
![]()
7 years ago
|
|
||
|
RestServiceManager service_manager_;
|
||
|
};
|
||
|
|
||
|
} // namespace webcc
|
||
|
|
||
|
#endif // WEBCC_REST_REQUEST_HANDLER_H_
|