Skip to content

Spry v3.3.0

Compare
Choose a tag to compare
@medz medz released this 30 Apr 16:39
· 142 commits to main since this release

To install Spry v3.3.0 run the following command:

dart pub add spry:3.3.0

or update your pubspec.yaml file:

dependencies:
  spry: ^3.3.0

What's Changed

  • Feature: Support request.fetch, see webfetch fetch function.

fetch

Used to retrieve data from the network.

It also supports you to ignore HTTP schema and host, and directly use path to obtain data from other handlers

// Remote with fetch
app.get('github/:name', (request) {
    return request.fetch('https://api.github.com/users/${request.param('name')}');
});

// Fetch profile
app.get('users/:id', (request) => ...);
app.get('profile/:id', (request) {
    return request.fetch('/users/${request.param('id')}');
});