Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix(api): incorrect content-type on HTTP PUT (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kewang authored and jmfrancois committed Nov 21, 2016
1 parent f4eff38 commit 9a51522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/api/api.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class OSMAPI {
_config.method = 'PUT';
_config.path = method;
_config.data = this.osmx2js.js2xml(content);
_config.options = {};
_config.options.header = {"Content-Type": "text/xml"};
return this.xhr(_config);
}
/**
Expand Down
4 changes: 2 additions & 2 deletions src/oauth/oauth.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class OAuthAdapter{
var deferred = this.$q.defer();
options.path = '/api' + options.path;
if (options.data) {
options.body = options.data;
options.data = undefined;
options.content = options.data;
delete options.data;
}
this.auth.xhr(options, function (err, data) {
if (err) {
Expand Down

0 comments on commit 9a51522

Please sign in to comment.