Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
Middleware.h
Go to the documentation of this file.
1
28 #ifndef MIDDLEWARE_HPP
29 #define MIDDLEWARE_HPP
30 #pragma once
31
32 #include "HttpRequest.h"
33 #include "HttpResponse.h"
34 #include "JwtAuthenticator.h"
35 #include <functional>
36 #include <vector>
37 #include "router.h"
38
50 using Middleware = std::function<bool(HttpRequest &, HttpResponse &, const RouteMatch &)>;
51
52
73
80
81 #endif // MIDDLEWARE_HPP
82
Defines the HttpRequest class for handling HTTP requests: headers, method, path, query string,...
HTTP HttpResponse class for managing status, headers, body, and streaming support.
Stateless singleton class for creating and validating JWTs using HMAC-SHA256.
Middleware loggingMiddleware
Logging middleware that prints the HTTP method and path to the console.
Middleware authMiddleware
std::function< bool(HttpRequest &, HttpResponse &, const RouteMatch &)> Middleware
Function signature for middleware components.
Definition Middleware.h:50
Forward declaration for potential routing needs.
Definition HttpRequest.h:32
Represents an HTTP response object.
Represents a match of a route against an incoming HTTP request.
Definition RouteTypes.h:18