Failed to load resource: the server responded with a status of 405 ()

Problem description: Submit form data insert operation, the front end sends Post request by axios, reached the correct background, debug step by step with the background without error, the data can be written into the table, but the page response 405 after an event is completed.

 

Baidu is often said that the request was changed to get post request, the association under his preceding requests and receives the background is no different with other functions, unreasonable 405, suddenly thought form copy over form is as follows

 

<form action = "" Method, = "POST" class = "Business Card-form Row"> 

</ form>

accustomed vue way binding to send data to the background, because the style issue a copy of the form over, is the use of action sends a request, Since I have sent Post by axios.post request, and then I put the form of
method = "post" to remove the statement, the page returns to normal after compilation. 

ps: When the code and logic used to write about the same (copy) but an error, note the similarities and differences, find the problem from different points

Guess you like

Origin www.cnblogs.com/shirs/p/11433575.html