handler abstract method
Handles incoming requests with a parsed body.
The body parameter contains the parsed request body of type T.
The return type can be:
String: Returned as plain text with content-type: text/plain- Custom object with
toJson(): Serialized to JSON List,Map, primitives: Serialized to JSONResponse: Returned directly
Implementation
Future<dynamic> handler(SparkRequest request, T body);