get<T> method

void get<T>(
  1. String path,
  2. FutureOr<T> closure(
    1. HttpRequest request
    )
)

Registers a GET route that responds to with the result of the closure.

app.get('/say-hello', (request) async => 'Hello, world!');

Implementation

void get<T>(String path, FutureOr<T> Function(HttpRequest request) closure) =>
    on(closure, method: 'GET', path: path);