apsavin / bnsf

bem node single page application framework
MIT License
43 stars 4 forks source link

Do something with inconsistency with `get` in `BEMTREE` and `post` in `apiRequester` #46

Closed apsavin closed 8 years ago

apsavin commented 8 years ago

get(route, routeParameters, callback) apiRequester.get(route, routeParameters) apiRequester.post(route, routeParameters, body)

When user does apiRequester.post(route, body, callback) he gets wrong behavior: callback treated as FormData.

Maybe, we can just check that arguments are correct and throw an error otherwise.

apsavin commented 8 years ago

Fixed into https://github.com/apsavin/bnsf/commit/a47da4c4f4e0a2fbec39c0b81389b5483eb4fa6c