Added missing return on SharedMethod.prototype.invoke, to support streams, and enforced application/json content-type. This needs to be made configurable.