简体   繁体   中英

What am I doing wrong? 405 error when trying to save values

I'm new to factories and all I'm trying to do is save the current settings from page load to the db. Then I want to update it when I click somewhere. However, I can't get it to save to db because of error POST http://localhost:8080/api/settings/ 405 (Method Not Allowed)

EDIT - Issue was not with code but I had not actually put the POST in my server... sorry about stupid

Error seems pretty clear, (Method Not Allowed) means that particular API will not accept POSTs, which is what you are sending on Settings.create() .
You may need to create a POST method on your API or change the method that vm.create calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM