Enable remote methods to be disabled by alias
Fix disableMethodByName
method to allow callers to specify one of method aliases instead of the "canonical" name. For example, disable the method removeById
by calling disableMethodByName('destroyById')
.
- Issue strongloop/loopback#1936
- Pull request #395
- Backport of #385
Fix content-type reported by the built-in error handler
When a remote method sets a custom content-type (e.g. image/jpeg
) and then fails, the content-type is reset back to application/json
now, in order to match the body contents.
- Pull request #390
Convert object query params to JSON in outgoing requests
When invoking a remote method via strong-remoting, fix the code building query string parameters to correctly handle edge cases like a deeply-nested empty-array value.
Consider the following invocation:
Model.find({where: {id: {inq: []}}})
Before the fix, an empty argument value was sent.
strong-remoting is sending the correct argument value now.