Comments (4)
Mostly the OPTIONS
request was send by browser rather than axios instance, when you make a CORS request. So we can't/shouldn't handle the OPTIONS
request.
from axios-extensions.
Hi, thank you for the prompt response! I use django rest framework on the backend that returns useful metadata of resources to an OPTIONS request. For example to dynamically build forms on the client side. http://www.django-rest-framework.org/api-guide/metadata/ What do you think?
from axios-extensions.
9.2 OPTIONS
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
Responses to this method are not cacheable.
With the w3 spec definition, only GET
and HEAD
response could be cacheable, so we may should not cache the OPTIONS
response imo. Check the spec: https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
Thanks for your feedback!🙂
from axios-extensions.
i guess it's plan B then :) what the drf metadata docs suggest under section "Creating schema endpoints".
thx for your responses, i'm closing this.
from axios-extensions.
Related Issues (20)
- Migrate LRUCache to v9.x.x
- axios 1.x has changed axios.defaults.adapter HOT 7
- Source maps reference .ts files
- axios 1.5.0 not compatible HOT 1
- Cannot find "./lib/helpers/buildURL" HOT 5
- State of the project?
- Ability to check if response is served from cache
- Invalidate All Cache HOT 3
- Is it possible to save cache in localstorage? HOT 1
- maxAge or throttleAdapterEnhancer HOT 1
- Is it possible to get the network request time that is cached?
- Doesn't work in Vite HOT 1
- ReferenceError: process is not defined HOT 1
- Is it possible to check if request is cached using axios response HOT 1
- Upgrade to LRUCache v7
- Missing source files for sourcemaps? HOT 3
- Warning from deprecated / renamed method in LRUCache HOT 7
- Axios cache just stopped working with today's update - How to solve? HOT 2
- About throttleAdapterEnhancer HOT 2
- Missing "./lib/helpers/buildURL" export in "axios" package HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axios-extensions.