AmpersandJS / ampersand-model

Observable objects, for managing state in applications.
MIT License
84 stars 31 forks source link

success handlers dont get access to the actual http response #49

Open yocontra opened 9 years ago

yocontra commented 9 years ago

https://github.com/AmpersandJS/ampersand-model/blob/master/ampersand-model.js#L52

The resp object is the JSON.parse(body) output, not the actual HTTP request. The success and error functions are inconsistent with one another, the arguments are in different orders and even though they are called the same arg names the data is totally different. Not sure what the thought process was behind how these were arranged but I think it would make sense to normalize them and make them work the same way.