can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r22050: LJSUP-12148: JSON-RPC

Committer: dpetrov
LJSUP-12148: JSON-RPC
U   trunk/htdocs/js/jquery/jquery.xdomainrequest.js
Modified: trunk/htdocs/js/jquery/jquery.xdomainrequest.js
===================================================================
--- trunk/htdocs/js/jquery/jquery.xdomainrequest.js	2012-05-24 12:27:44 UTC (rev 22049)
+++ trunk/htdocs/js/jquery/jquery.xdomainrequest.js	2012-05-24 13:01:09 UTC (rev 22050)
@@ -34,7 +34,7 @@
 						try {
 							if (userType === 'json') {
 								try {
-									responses.json = JSON.parse(xdr.responseText);
+									responses.json = (window.JSON || LiveJournal.JSON).parse(xdr.responseText);
 								} catch(e) {
 									status.code = 500;
 									status.message = 'parseerror';
@@ -67,7 +67,7 @@
 						});
 					};
 					xdr.open(options.type, options.url);
-					xdr.send();
+					xdr.send(options.data);
 				},
 				abort: function() {
 					if (xdr) {
@@ -77,4 +77,4 @@
 			};
 		}
 	});
-}
\ No newline at end of file
+}

Tags: can3p, dpetrov, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments