File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ After compile and start will be available on `http://localhost:1234/app2/`
9494
9595Define class:
9696
97- header-file:
97+ header-file ` http_handler_custom.h ` :
9898```
9999#ifndef HTTP_HANDLER_CUSTOM_H
100100#define HTTP_HANDLER_CUSTOM_H
@@ -113,15 +113,15 @@ class HttpHandlerCustom : WSJCppLightWebHttpHandlerBase {
113113#endif // HTTP_HANDLER_CUSTOM_H
114114```
115115
116- source-file:
116+ source-file ` http_handler_custom.cpp ` :
117117```
118118#include <wsjcpp_core.h>
119+ #include "http_handler_custom.h"
119120
120121// ----------------------------------------------------------------------
121122
122123HttpHandlerCustom::HttpHandlerCustom()
123- : WSJCppLightWebHttpHandlerBase("custom") {
124-
124+ : WSJCppLightWebHttpHandlerBase("custom") {
125125 TAG = "HttpHandlerCustom";
126126}
127127
@@ -147,7 +147,7 @@ bool HttpHandlerCustom::handle(const std::string &sWorkerId, WSJCppLightWebHttpR
147147 std::string sRequestPath = pRequest->getRequestPath();
148148 // WSJCppLog::warn(_tag, sRequestPath);
149149
150- WSJCppLightWebHttpResponse resp(pRequest->sockFd ());
150+ WSJCppLightWebHttpResponse resp(pRequest->getSockFd ());
151151 if (sRequestPath == "/custom" || sRequestPath == "/custom/") {
152152 resp.cacheSec(60).ok().sendText(
153153 "<h1>This is custom</h1>"
You can’t perform that action at this time.
0 commit comments