vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

Adding an 'options' action.

Open onekiloparsec opened this issue 7 years ago • 1 comments

Hi. This is a tricky thing, and I am skeptical about its acceptance success, but who knows?

The main goal of this PR is to add an options method, similarly to get and others. I am aware of the CORS options preflight requests. But still, I am trying to auto-document my REST apis through the overlooked OPTIONS method. In other words, I want to make specific OPTIONS requests to my API.

I have tried to use the creation of resources. But I spent hours trying to change headers of existing resources (to set the Authorisation header), to no avail. Once the resource is made, I couldn't find a way to change its headers. I use the global accessor Vue.http inside a vuex module to make my API requests.

The only solution I found is to add the method I need directly inside vue-resource.

If you have any better idea on how to deal with this, I'll be happy to hear about it! Thanks anyway.

onekiloparsec avatar Oct 29 '17 14:10 onekiloparsec

@steffans Any ideas for implement OPTIONS method?

vladyslav2 avatar Mar 10 '18 01:03 vladyslav2