mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Add OPTIONS-method as a shortcut
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ Axios.prototype.request = function request(config) {
|
||||
};
|
||||
|
||||
// Provide aliases for supported request methods
|
||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
||||
/*eslint func-names:0*/
|
||||
Axios.prototype[method] = function(url, config) {
|
||||
return this.request(utils.merge(config || {}, {
|
||||
|
||||
Reference in New Issue
Block a user