Answer the question
In order to leave comments, you need to log in
Error on axios request?
When submitting a request, I get an error Error: Request failed with status code 400 . when I request it again, I get 200ok data is not valid.
Answer the question
In order to leave comments, you need to log in
if I’m not mistaken, axios doesn’t send anything itself, so if there are any middleware on the server, let’s say on csrf, then it throws an error. It is necessary to explicitly add such things to the request. You also need to explicitly indicate that there is an Ajax request. So without information that it is difficult to answer on the backend, it also returns an error
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question