req property

Request req
final

Request object of the current HTTP request.

Example:

final server = Jaguar();
server.post('/api/book', (Context ctx) async {
  // Decode request body as JSON Map
  final List json = await ctx.req.bodyAsJsonList();
  // ...
});
await server.serve();

Implementation

final Request req