Closed apsavin closed 8 years ago
get(route, routeParameters, callback) apiRequester.get(route, routeParameters) apiRequester.post(route, routeParameters, body)
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.
apiRequester.post(route, body, callback)
Maybe, we can just check that arguments are correct and throw an error otherwise.
Fixed into https://github.com/apsavin/bnsf/commit/a47da4c4f4e0a2fbec39c0b81389b5483eb4fa6c
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.