class
Analyzer::Dart::Serverpod
- Analyzer::Dart::Serverpod
- Analyzer
- Reference
- Object
Overview
Serverpod is an RPC-style backend framework. Server endpoints are
Dart classes that extend Endpoint (or StreamingEndpoint); each
public method takes a Session as its first parameter and is
exposed to clients as a callable RPC. The class name's Endpoint
suffix is dropped and the first character is lowercased to derive
the endpoint name (OrderEndpoint → order).
Serverpod dispatches every call as a POST to /<endpointName>
with the method name and arguments encoded in the body. We surface
each method as POST /<endpointName>/<methodName> so individual
RPCs are visible in the output, with the non-Session arguments
reported as JSON body params.
Defined in:
analyzer/analyzers/dart/serverpod.crConstant Summary
-
HTTP_METHOD =
"POST" -
RESERVED_DART_NAMES =
["if", "else", "for", "while", "switch", "case", "return", "try", "catch", "finally", "throw", "new", "const", "final", "var", "late", "void", "await", "async", "assert"] of ::String -
WEB_METHOD_MAP =
{"get" => "GET", "post" => "POST", "put" => "PUT", "patch" => "PATCH", "delete" => "DELETE", "head" => "HEAD", "options" => "OPTIONS"} -
Method.<verb>constants accepted byRoute'smethods:set.