polymer_http_behavior

Dart Polymer Http behavior

GET, POST, PUT, PATCH, DELETE, HEAD function

Usage

import 'package:polymer/polymer.dart';
import 'package:polymer_http_behavior/polymer_http_behavior.dart';
import 'package:http/http.dart' as http;

@behavior
abstract class FooBehavior implements PolymerHttpBehavior {

  getFoo() =>
      httpGet("/foo", headers: { "foo": "bar"}, params: { "bar": "foo"}).then((http.Response response) {
        print(response.body);
      });

}

Libraries

polymer_http_behavior

Created by lejard_h on 11/10/15.