web_server library

Classes

FallbackMiddleware
Middleware that falls back to an alternative handler when a response matches a condition.
FlutterRoute
Route for serving Flutter web applications.
JsonWidget
A WebWidget that renders JSON output. The output will be the result of passing the provided object to jsonEncode.
ListWidget
Combines a List of WebWidgets into a single WebWidget.
RedirectWidget
A WebWidget that renders a HTTP redirect to the provided url.
Route
A Route defines a destination in Serverpod's web server. It will handle a call and generate an appropriate response by manipulating the Request object. You override Route, or more likely it's subclass WidgetRoute to create your own custom routes in your server.
SpaRoute
Route for serving Single Page Applications (SPAs) with fallback support.
StaticRoute
Route for serving static assets.
Templates
Loads and caches templates.
TemplateWidget
A WebWidget based on a HTML template. The name of the template should correspond to a template file in your server's web/templates directory. Set the custom values of the template by populating the values field. If values are set that aren't Strings, the toString method will be called on the value. The templates are loaded when the server starts. If you add new templates or modify existing templates, you will need to restart the server for them to take effect.
WasmHeadersMiddleware
Middleware that adds WebAssembly multi-threading headers to responses.
WebServer
The Serverpod webserver.
WebWidget
The base class for all web widgets. Override this class to create a custom widget type, or use one of the default types which covers most common use cases.
WidgetRoute
A WidgetRoute is the most convenient way to create routes in your server. Override the build method and return an appropriate WebWidget.

Extensions

SessionEx on Request
Session related extension methods for Request.

Properties

templates Templates
Global access to all templates loaded when starting the webserver.
final