This repository was archived by the owner on Dec 1, 2023. It is now read-only.
Adding an 'options' action. #659
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 toget
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 specificOPTIONS
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 accessorVue.http
inside avuex
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.