This adds the option to use do application/json requests instead of application/x-www-form-urlencoded because the latter will convert every value into strings and this is sometimes not desirable. To make this a non-breaking change we will add a new options to set this.
At the getData level, where if you pass {json: true}, it will do a JSON request. This is an optional parameter.
At the application level by setting oc.conf.jsonRequests = true. This will be the global setting used by default, unless overriden by the previous one.
This adds the option to use do
application/json
requests instead ofapplication/x-www-form-urlencoded
because the latter will convert every value into strings and this is sometimes not desirable. To make this a non-breaking change we will add a new options to set this.getData
level, where if you pass {json: true}, it will do a JSON request. This is an optional parameter.oc.conf.jsonRequests = true
. This will be the global setting used by default, unless overriden by the previous one.