sproutcore/sproutcore — pull request #656 by tstachl (2011-12-18 17:34:28+00:00)
Title: encodedBody function should not only be checking for isJSON or isXML

Way more important for the encoded body is the content type header, because even if I want json in return, it doesn't mean that it is a json encoded string that I'm sending. So I changed the function that it initially checks if the body is a string (if already string we don't need to encode at all) and then for the content type header. If the content type is application/json the body should be encoded to a json string if it is urlencoded we can use the $.param function from jQuery to create an urlencoded string.