Answer the question
In order to leave comments, you need to log in
Preflight not working on put request?
I send a put request using axios, but it says options to me, even though I set "preflight".
this.url.defaults.transformRequest = [(data) => JSON.stringify(data)]
return this.url.put('/index.php/rest/' + type + '/signin',{
number
})
return this.url.post('/index.php/rest/' + post.type + '/signup',{
"number" : post.number,
"name" : post.name,
"city_id" : post.city_id,
})
Answer the question
In order to leave comments, you need to log in
If this is a cross-domain request, then you must first process OPTIONS, and then accept POST
Here it is described in detail
OOO, I found what the problem is, it turns out that the server side forbade the put request
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question