Diff

net/http.lua @ 5466:e3b9dc9dd940

net.http: Swap response and request parameters passed to callback (will break some modules)
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Apr 2013 00:31:05 +0100
parent 5464:712dbe1a0146
child 5488:0880a079d830
line wrap: on
line diff
--- a/net/http.lua	Thu Apr 11 21:55:20 2013 +0100
+++ b/net/http.lua	Fri Apr 12 00:31:05 2013 +0100
@@ -76,8 +76,7 @@
 		if not data then return; end
 		local function success_cb(r)
 			if request.callback then
-				for k,v in pairs(r) do request[k] = v; end
-				request.callback(r.body, r.code, request, r);
+				request.callback(r.body, r.code, r, request);
 				request.callback = nil;
 			end
 			destroy_request(request);