Closed mccreadylemon closed 8 years ago
also here is my code
prestan.delete('addresses', {id:3} ).then(function(response){ console.log(response); }).catch(function(error) { console.log(error); });
Delete is implemented yes, can you post the full code snippet you're using?
is the above syntax correct? thanks
The code looks correct, but can you post the code you're using to require and instantiate the library?
var config = require('./config'), Prestan = require('prestan'), options = {debug: config.production ? false : true}, prestan = new Prestan(config.remoteUrl, config._APIKEY , options);
module.exports = prestan;
any update?
Can't reproduce it, sorry.
node_modules/prestan/index.js
line #177: return this.executeRequest('delete', url).then(function (response) {
replace: return this.executeRequest('del', url).then(function (response) {
@liferus That's wrong. Closing this anyway.
actually that worked! thanks!
Hello, is delete implemented? I get [TypeError: Object function request(uri, options, callback) { if (typeof uri === 'undefined') { throw new Error('undefined is not a valid uri or options object.') }
var params = initParams(uri, options, callback)
if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { throw new Error('HTTP HEAD requests MUST NOT include a request body.') }
return new request.Request(params) } has no method 'delete']