Skip to content

Commit

Permalink
Merge branch 'pr/29'
Browse files Browse the repository at this point in the history
Fix #29
  • Loading branch information
passy committed Sep 4, 2014
2 parents 64b169c + fb97609 commit a77cdc0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ config.ajax({
});
```

**WARNING**: Note that defining a success or error function in the ajax options hash will make Hyperagent unable to properly handle AJAX calls (Hyperagent ties into these two ajax options to resolve promises). A configuration setting these options will make it so Hyperagent resources will never properly resolve/throw errors:

```javascript

var Resource = require('hyperagent').Resource;
var api = new Resource({
url: 'https://api.example.com/',
ajax: {
success: function(){}, // DON'T DO THIS
error: function(){} // OR THIS
}
});
```


### Attributes

Attributes are exposed as the `props` object on the Resource instance:
Expand Down

0 comments on commit a77cdc0

Please sign in to comment.