{"pull_request":{"title":"encodedBody function should not only be checking for isJSON or isXML","merged_at":null,"user":{"id":286093,"login":"tstachl","url":"https://api.github.com/users/tstachl","avatar_url":"https://secure.gravatar.com/avatar/21506b82f900e1c8f7feec2118288b8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"21506b82f900e1c8f7feec2118288b8d"},"created_at":"2011-12-18T17:34:28Z","state":"open","updated_at":"2011-12-18T17:34:28Z","review_comments":0,"id":607564,"patch_url":"https://github.com/sproutcore/sproutcore/pull/656.patch","html_url":"https://github.com/sproutcore/sproutcore/pull/656","closed_at":null,"deletions":2,"mergeable":null,"issue_url":"https://github.com/sproutcore/sproutcore/issues/656","base":{"user":{"id":84149,"login":"sproutcore","url":"https://api.github.com/users/sproutcore","avatar_url":"https://secure.gravatar.com/avatar/6fa92081b3ed457fbc2785e548d4b80c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"6fa92081b3ed457fbc2785e548d4b80c"},"ref":"master","sha":"64b145ba046b915f542a7f5e56b9d99a7521f7f4","repo":{"open_issues":160,"created_at":"2010-09-19T03:50:35Z","watchers":1589,"git_url":"git://github.com/sproutcore/sproutcore.git","updated_at":"2011-12-18T17:19:45Z","fork":false,"id":921928,"language":"JavaScript","html_url":"https://github.com/sproutcore/sproutcore","name":"sproutcore","description":"JavaScript Application Framework - JS library only","master_branch":null,"url":"https://api.github.com/repos/sproutcore/sproutcore","forks":203,"ssh_url":"git@github.com:sproutcore/sproutcore.git","clone_url":"https://github.com/sproutcore/sproutcore.git","pushed_at":"2011-12-16T06:59:12Z","owner":{"id":84149,"login":"sproutcore","url":"https://api.github.com/users/sproutcore","avatar_url":"https://secure.gravatar.com/avatar/6fa92081b3ed457fbc2785e548d4b80c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"6fa92081b3ed457fbc2785e548d4b80c"},"homepage":"sproutcore.com","size":2152,"svn_url":"https://svn.github.com/sproutcore/sproutcore","private":false},"label":"sproutcore:master"},"body":"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.","commits":1,"additions":6,"number":656,"url":"https://api.github.com/repos/sproutcore/sproutcore/pulls/656","diff_url":"https://github.com/sproutcore/sproutcore/pull/656.diff","merged_by":null,"_links":{"review_comments":{"href":"https://api.github.com/repos/sproutcore/sproutcore/pulls/656/comments"},"html":{"href":"https://github.com/sproutcore/sproutcore/pull/656"},"self":{"href":"https://api.github.com/repos/sproutcore/sproutcore/pulls/656"},"comments":{"href":"https://api.github.com/repos/sproutcore/sproutcore/issues/656/comments"}},"comments":0,"head":{"user":{"id":286093,"login":"tstachl","url":"https://api.github.com/users/tstachl","avatar_url":"https://secure.gravatar.com/avatar/21506b82f900e1c8f7feec2118288b8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"21506b82f900e1c8f7feec2118288b8d"},"ref":"master","sha":"50cef21f3b47bca17a61c3ed16e2cd8569cb589b","repo":{"open_issues":0,"created_at":"2011-12-18T17:19:45Z","watchers":1,"git_url":"git://github.com/tstachl/sproutcore.git","updated_at":"2011-12-18T17:30:22Z","fork":true,"id":3006971,"language":"JavaScript","html_url":"https://github.com/tstachl/sproutcore","name":"sproutcore","description":"JavaScript Application Framework - JS library only","master_branch":null,"url":"https://api.github.com/repos/tstachl/sproutcore","forks":0,"ssh_url":"git@github.com:tstachl/sproutcore.git","clone_url":"https://github.com/tstachl/sproutcore.git","pushed_at":"2011-12-18T17:30:16Z","owner":{"id":286093,"login":"tstachl","url":"https://api.github.com/users/tstachl","avatar_url":"https://secure.gravatar.com/avatar/21506b82f900e1c8f7feec2118288b8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"21506b82f900e1c8f7feec2118288b8d"},"homepage":"sproutcore.com","size":160,"svn_url":"https://svn.github.com/tstachl/sproutcore","private":false},"label":"tstachl:master"},"changed_files":1,"merged":false},"number":656,"action":"opened"}