Y
Y
yativ_sobb2017-08-01 08:37:35
JavaScript
yativ_sobb, 2017-08-01 08:37:35

Sending the put method of the options?

The put send sends options, but the post send does it work?
Does not work

this.url.defaults.transformRequest = [(data) =>  JSON.stringify(data)]
    return this.url.put('/index.php/rest/' + type + '/send',{
      number
    })

Works
his.url.defaults.transformRequest = [(data) =>  JSON.stringify(data)]
return this.url.post('/index.php/rest/' + post.type + '/signup',{
        "number" : post.number,
        "name" : post.name,
        "city_id" : post.city_id,
      })

Although I write transformRequest

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2017-08-01
@Fragster

Why doesn't axios.put + expressjs work?
The server must return the Access-Control-Allow-Methods header

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question