comparison mod_sms_clickatell/mod_sms_clickatell.lua @ 983:ac9bf3fcbcfe

mod_pubsub_feeds, mod_sms_clickatell, mod_twitter: Update for net.http API change in prosody:e3b9dc9dd940
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Apr 2013 00:33:41 +0100
parents cd838419a85d
children 3fd6579d60cc
comparison
equal deleted inserted replaced
982:ce8bb0386d08 983:ac9bf3fcbcfe
198 end 198 end
199 return true; 199 return true;
200 end 200 end
201 201
202 function http_add_action(tid, url, method, post, fcallback) 202 function http_add_action(tid, url, method, post, fcallback)
203 local request = http.request(url, { headers = http_headers or {}, body = "", method = method or "GET" }, function(response, code, request) http_action_callback(response, code, request, fcallback) end); 203 local request = http.request(url, { headers = http_headers or {}, body = "", method = method or "GET" }, function(response_body, code, response, request) http_action_callback(response_body, code, request, fcallback) end);
204 http_queue[request] = tid; 204 http_queue[request] = tid;
205 timer.add_task(http_timeout, function() http.destroy_request(request); end); 205 timer.add_task(http_timeout, function() http.destroy_request(request); end);
206 return true; 206 return true;
207 end 207 end
208 208