FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
esp32_https_server/src/HTTPMiddlewareFunction.hpp at master · quentin/esp32_https_server · GitHub
quentin
esp32_https_server
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
esp32_https_server
/
src
/
HTTPMiddlewareFunction.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (23 loc) · 1.07 KB
Breadcrumbs
esp32_https_server
/
src
/
HTTPMiddlewareFunction.hpp
Copy path
File metadata and controls
26 lines (23 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
ifndef
SRC_HTTPMIDDLEWAREFUNCTION_HPP_
#
define
SRC_HTTPMIDDLEWAREFUNCTION_HPP_
#
include
<
functional
>
#
include
"
HTTPRequest.hpp
"
#
include
"
HTTPResponse.hpp
"
#
include
"
HTTPSCallbackFunction.hpp
"
namespace
httpsserver
{
class
HTTPRequest
;
/*
*
* \brief A middleware function that can be registered at the server.
*
* It will be called before an incoming request is passed to any HTTPSCallbackFunction and may perform
* operations like redirects or authentication.
*
* It receives the request and response object as well as a function pointer ("next") to pass on processing.
* This allows chaining those functions. If next() is not called, the HTTPSCallbackFunction that
* would match the request url will not be invoked. This might become handy if you want to intercept request
* handling in case of missing authentication. Don't forget to call next in case you want to access your
* resources, though.
*/
typedef
void
(HTTPSMiddlewareFunction)(HTTPRequest * req, HTTPResponse * res, std::function<
void
()> next);
}
#
endif
/*
SRC_HTTPMIDDLEWAREFUNCTION_HPP_
*/
Back
|
FazBrowse Home
|
New Git URL