Sending JSON content type in from JavaScript objects ( jQuery ajax )
- by smartnut007
I am having trouble sending JavaScript objects as a http request that only accepts json content-type. i.e "application/json" or "text/json"
But, I am not sure why
data2 ( stringified json ) works fine
But, data1 ( json object ) does throws 400 ( Bad Request ).
i.e I am not sure jQuery does not serialize the json object to a valid json string…