Updated client.js

Updated client.js to support json. It was throwing an SOAP error when
request comes through in JSON format.

Changes done @ line no. 176