Module jls.net.http.HttpFilter
HTTP filter class.
A filter allows to process an HTTP exchange prior to call the handler. It can be used for tasks such as authentication, access control, logging.
Class HttpFilter
HttpFilter:new ([fn]) | Creates an HTTP filter. |
httpFilter:doFilter (httpExchange) | Filters the specified exchange. |
Class HttpFilter
A HttpFilter class.
- HttpFilter:new ([fn])
-
Creates an HTTP filter.
Parameters:
- fn function a function that will be call to filter the HTTP exchange (optional)
- httpFilter:doFilter (httpExchange)
-
Filters the specified exchange.
Called when the request headers have been received.
Parameters:
- httpExchange HttpExchange the HTTP exchange to filter
Returns:
-
boolean
false to indicate the request must not handled.