docs(server-communication): Resolve todo (#1993)

* use latest version of http_in_memory_web_api

* remove todo and drop the ?? body term
This commit is contained in:
Adão Júnior 2016-08-01 18:13:24 -03:00 committed by Kathy Walrath
parent e2919de78f
commit 6f63e6a390
2 changed files with 2 additions and 4 deletions

View File

@ -50,9 +50,7 @@ class HeroService {
// #docregion extract-data // #docregion extract-data
dynamic _extractData(Response res) { dynamic _extractData(Response res) {
var body = JSON.decode(res.body); var body = JSON.decode(res.body);
// TODO: https://github.com/adaojunior/http-in-memory-web-api/issues/1 return body['data'];
// Once #1 is fixed, drop the `?? body` term:
return body['data'] ?? body;
} }
// #enddocregion extract-data // #enddocregion extract-data
// #docregion error-handling // #docregion error-handling

View File

@ -11,7 +11,7 @@ dependencies:
http: ^0.11.3+3 http: ^0.11.3+3
jsonpadding: ^0.1.0 jsonpadding: ^0.1.0
stream_transformers: ^0.3.0+3 stream_transformers: ^0.3.0+3
http_in_memory_web_api: ^0.0.1 http_in_memory_web_api: ^0.2.0
# #docregion transformers # #docregion transformers
transformers: transformers:
- angular2: - angular2: