diff --git a/sample/GettingStartedSample_Node.js/public/index.html b/sample/GettingStartedSample_Node.js/public/index.html index 46a17b8..ae144f7 100644 --- a/sample/GettingStartedSample_Node.js/public/index.html +++ b/sample/GettingStartedSample_Node.js/public/index.html @@ -208,10 +208,10 @@ path: call.path, auth: auth.search, userId: auth.userId, - userKey: auth.userKey + userKey: auth.userKey, + body: useBody() && call.body || '' }) .type('json') - .send(useBody() && call.body || '') .end(function (err, res) { document.getElementById('resultStatus').textContent = res.status; document.getElementById('resultBody').textContent = JSON.stringify(res.body, undefined, '\t'); diff --git a/sample/GettingStartedSample_Node.js/server.js b/sample/GettingStartedSample_Node.js/server.js index 0c27437..e734d18 100644 --- a/sample/GettingStartedSample_Node.js/server.js +++ b/sample/GettingStartedSample_Node.js/server.js @@ -64,7 +64,7 @@ app if (['post', 'put'].indexOf(method) !== -1) { apiCall.type('application/json'); - req.pipe(apiCall); + apiCall.send(req.param('body')); } apiCall.end(function (err, apiRes) {