Skip to content

Commit

Permalink
Work around delete key word. Change "Accept" header.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Dean committed Aug 17, 2012
1 parent a592430 commit 277f0ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/store/rest.js
Expand Up @@ -63,7 +63,7 @@ function request(options, callback) {
}.bind(this);

xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Accept', 'application/json, text/javascript, */*');
xhr.setRequestHeader('Accept', 'application/json');
xhr.setRequestHeader('Content-type', 'application/json; charset=utf8');

if (config.headers) for (var name in config.headers) {
Expand Down Expand Up @@ -210,8 +210,7 @@ function save(record, callback) {
*
* Deletes the provides object from the database.
**/
Rest.prototype.delete = delete;
function delete(record, callback) {
Rest.prototype.delete = function(record, callback) {
var Type = this.DataType;
var primaryKey = Type.primaryKey;

Expand Down
File renamed without changes.

0 comments on commit 277f0ce

Please sign in to comment.