fixes #605 - allow JS client to encode the post data using:
postData : encodeURIComponent(data)
, and check on the server side whether to decode if contains { or < (to
recognize plain JSON or XML)