Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
update method lowercasing
Browse files Browse the repository at this point in the history
  • Loading branch information
steffans committed Aug 11, 2015
1 parent d2a76a9 commit 58d180a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ module.exports = function (Vue) {
options.crossOrigin = crossOrigin(options.url);
}

options.headers = _.extend({},
Http.headers.common,
options.method = options.method.toLowerCase();
options.headers = _.extend({}, Http.headers.common,
!options.crossOrigin ? Http.headers.custom : {},
Http.headers[options.method.toLowerCase()],
Http.headers[options.method],
options.headers
);

Expand All @@ -62,7 +62,7 @@ module.exports = function (Vue) {
options.data = JSON.stringify(options.data);
}

promise = (options.method.toLowerCase() == 'jsonp' ? jsonp : xhr).call(this, this.$url || Url, options);
promise = (options.method == 'jsonp' ? jsonp : xhr).call(this, this.$url || Url, options);
promise = extendPromise(promise.then(transformResponse, transformResponse), this);

if (options.success) {
Expand Down

0 comments on commit 58d180a

Please sign in to comment.