Does $.post() NOT convert json string to json if the response Content-Type is "application/json"?
I'm a long-time programmer with detailed knowledge of Javascript, but not a lot of practical experience with it. I'm going through "Pro JQuery".
One of the first Ajax exercises in the book doesn't work correctly, because the author assumes that "$.post(url, data, func)" is going to automatically convert the response to a Javascript object, under the implicit assumption that the response's Content-Type is "application/json". It seems logical to me that it would, but that's not happening. It appears to be assuming the dataType is "text".
I was able to fix it by adding the optional "dataType" parameter as "json".
I'm wondering whether there was ever a time or condition where this call to $.post() WOULD have automatically converted the response to a Javascript object. The book was written using JQuery 1.7. I'm using 1.8.3.