http_in_memory_web_api 0.2.0 copy "http_in_memory_web_api: ^0.2.0" to clipboard
http_in_memory_web_api: ^0.2.0 copied to clipboard

outdatedDart 1 only

An in-memory web api for demos and tests.

http-in-memory-web-api #

An in-memory web api for demos and tests.

Inspired by angular2-in-memory-web-api

Usage #

A simple usage example:

import 'package:http_in_memory_web_api/http_in_memory_web_api.dart';

main() async {
  final http = new HttpClientInMemoryBackendService(data);

  final response = await http.get('app/heroes.json');
  print(response.body);
  print(response.statusCode);
  print(response.headers);
}

CreateDb data = () => {
  'heroes':[
    { "id": "1", "name": "Windstorm" },
    { "id": "2", "name": "Bombasto" },
    { "id": "3", "name": "Magneta" },
    { "id": "4", "name": "Tornado" }
  ]
};

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
25
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

An in-memory web api for demos and tests.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

browser, http

More

Packages that depend on http_in_memory_web_api