Now the constructor takes an optional $options array which allows json, jsonp and cors responses.