request.post({ url: 'http://apibunny.com/users', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ twitter_handle: '@braddwyer' }) }, function(error, response, body) { console.log(body); });
Results in:
{ "error": "Request was malformed.", "detail": "TypeError: Cannot call method 'forEach' of undefined" }
Not sure how to go any further with no API docs.
It has a particular format to do POST request. Good luck !
request.post({ url: 'http://apibunny.com/users', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ twitter_handle: '@braddwyer' }) }, function(error, response, body) { console.log(body); });
Results in:
{ "error": "Request was malformed.", "detail": "TypeError: Cannot call method 'forEach' of undefined" }
Not sure how to go any further with no API docs.