Quantcast
Viewing all articles
Browse latest Browse all 3491

404 Not Found At the time of Saving

var Todo = can.Model({ findAll: 'GET /todos', findOne: 'GET /todos/{id}', create: 'POST /todos', update: 'PUT /todos/{id}', destroy: 'DELETE /todos/{id}' }, {})
undefined
var todo = new Todo{(name: "Pick Up Milk", completed: false)}
SyntaxError: Unexpected token {
var todo = new Todo({name: "Pick Up Milk", completed: false})
undefined
todo.save()
Object {statefunctionalwaysfunctionthenfunctionpromisefunctionpipefunction}
Above is my code..and I am going to save it by "tood.save()"..I am geting 404 Not Found.. So can anybody help me to fix it... The Error as follows: POST http://localhost:8087/todos 404 (Not Found) jquery-2.0.2.js:7858 send jquery-2.0.2.js:7858 jQuery.extend.ajax jquery-2.0.2.js:7314 ajax can.jquery.js:5952 (anonymous function) can.jquery.js:6144 (anonymous function) can.jquery.js:6294 (anonymous function) can.jquery.js:6190 makeRequest can.jquery.js:5982 can.Model.can.Map.save can.jquery.js:6248 (anonymous function) VM544:2 InjectedScript._evaluateOn VM482:581 InjectedScript._evaluateAndWrap VM482:540 InjectedScript.evaluate

Viewing all articles
Browse latest Browse all 3491

Trending Articles