totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

Delete Flag #634

Closed ivanlunardi closed 6 years ago

ivanlunardi commented 6 years ago

In 2.9.4 a can't use 'delete' flag in request , other flags works.

Thank you

es: exports.install = function () { F.route('/prova',prova,['delete']) };

function prova() { var self = this; self.json(SUCCESS(true)); }

petersirka commented 6 years ago

Hi @ivanlunardi, which content-type is used in your request? DELETE method is same like POST or PUT method and Total.js expects application/json or application/x-www-form-urlencoded.

ivanlunardi commented 6 years ago

i use $http client of angularjs , if in the same route a change delete in post , it works. with delete i receive 404 ,now i will try to force content-type

ivanlunardi commented 6 years ago

forcing content-type it works. thank you