Add a shortcut to a request's response body since it's what it'll be used for most of the time.

This commit is contained in:
Sergio Díaz 2017-03-07 18:08:31 -06:00
parent 3de4378383
commit 2531a8bb32
2 changed files with 3 additions and 1 deletions

View File

@ -7,5 +7,5 @@ GET /posts/:
POST /posts/:
alias: new-post
GET /users/$posts.response.body.0.userId:
GET /users/$posts.body.0.userId:
alias: post-user

View File

@ -79,6 +79,8 @@ class Request {
}
};
results.body = results.response.body;
cache.add(`$${this.ALIAS}`, results);
resolve(results);