2
0
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:
Teemu Heikkilä
2016-09-29 18:54:17 +03:00
parent d982cf9932
commit 2e0adc1cae
3 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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 || {}, {