Skip to content

Commit 8d675bb

Browse files
committed
Merge branch 'master' of github.com:mzabriskie/axios
2 parents 5b904d5 + efc1f11 commit 8d675bb

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ For convenience aliases have been provided for all supported request methods.
140140
##### axios.get(url[, config])
141141
##### axios.delete(url[, config])
142142
##### axios.head(url[, config])
143+
##### axios.options(url[, config])
143144
##### axios.post(url[, data[, config]])
144145
##### axios.put(url[, data[, config]])
145146
##### axios.patch(url[, data[, config]])
@@ -176,6 +177,7 @@ The available instance methods are listed below. The specified config will be me
176177
##### axios#get(url[, config])
177178
##### axios#delete(url[, config])
178179
##### axios#head(url[, config])
180+
##### axios#options(url[, config])
179181
##### axios#post(url[, data[, config]])
180182
##### axios#put(url[, data[, config]])
181183
##### axios#patch(url[, data[, config]])
@@ -308,7 +310,7 @@ These are the available config options for making requests. Only the `url` is re
308310
proxy: {
309311
host: '127.0.0.1',
310312
port: 9000,
311-
auth: : {
313+
auth: {
312314
username: 'mikeymike',
313315
password: 'rapunz3l'
314316
}

lib/core/Axios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Axios.prototype.request = function request(config) {
6161
};
6262

6363
// Provide aliases for supported request methods
64-
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
64+
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
6565
/*eslint func-names:0*/
6666
Axios.prototype[method] = function(url, config) {
6767
return this.request(utils.merge(config || {}, {

test/specs/api.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ describe('static api', function () {
33
expect(typeof axios.request).toEqual('function');
44
expect(typeof axios.get).toEqual('function');
55
expect(typeof axios.head).toEqual('function');
6+
expect(typeof axios.options).toEqual('function');
67
expect(typeof axios.delete).toEqual('function');
78
expect(typeof axios.post).toEqual('function');
89
expect(typeof axios.put).toEqual('function');
@@ -48,6 +49,7 @@ describe('instance api', function () {
4849
it('should have request methods', function () {
4950
expect(typeof instance.request).toEqual('function');
5051
expect(typeof instance.get).toEqual('function');
52+
expect(typeof instance.options).toEqual('function');
5153
expect(typeof instance.head).toEqual('function');
5254
expect(typeof instance.delete).toEqual('function');
5355
expect(typeof instance.post).toEqual('function');

0 commit comments

Comments
 (0)