F
F
fostsinger2018-07-27 12:30:36
Vue.js
fostsinger, 2018-07-27 12:30:36

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

1 answer(s)
A
Arman, 2018-07-27
@Arik

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 question

Ask a Question

731 491 924 answers to any question