From 448d78e166869610724ea59a446d030d520d27f9 Mon Sep 17 00:00:00 2001 From: Sabrina Tee Date: Wed, 31 May 2017 11:21:11 +0800 Subject: [PATCH] Added a clearer .request() example --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 839b774..48b5cc1 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,14 @@ client.post('add', { }).then(response => { console.log(response.jsonData); }); + +// Example +let postBody = {firstName: 'hello', lastName: 'world'}; + +client.request('profile', 'PUT', {json: postBody}) + .then(resp => { + console.log(resp.jsonData); + }); ``` ### credentials