rest 0.2.3 copy "rest: ^0.2.3" to clipboard
rest: ^0.2.3 copied to clipboard

outdated

This is a helper for creating RESTful applications. It also comes equipped with an implementation for HTTP REST.

rest #

A Dart library for creating REST applications.

Example #

      import 'rest:rest/http_rest.dart' show HttpRest, HttpRestRoute;

      var routes = {
        r"^foo": {
          r"^bar$": {
            r"\d+": new HttpRestRoute({
              'GET': getFooBar         // a function called createFooBar
            }),
          }),
        }
      };

      // create the rest object itself
      HttpRest rest = new HttpRest(routes);

      HttpServer.bind('0.0.0.0', 8000),then((server) {
        server.listen((HttpRequest request)
          rest.resolve(request);
        });
      });

      getFooBar() {
        return new HttpRestResponse().build(204, 'created a fooBar!\n');
      }

Documentation #

See doc/rest.md.

API docs are generated and available on pub.flutter-io.cn.

http://pub.flutter-io.cn/packages/rest

Copyright/Licensing #

See LICENSE

0
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

This is a helper for creating RESTful applications. It also comes equipped with an implementation for HTTP REST.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on rest