Mercurial > prosody-modules
comparison mod_twitter/mod_twitter.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 | be509416d64c |
| children | 65082d91950e |
comparison
equal
deleted
inserted
replaced
| 982:ce8bb0386d08 | 983:ac9bf3fcbcfe |
|---|---|
| 71 end | 71 end |
| 72 return true; | 72 return true; |
| 73 end | 73 end |
| 74 | 74 |
| 75 function http_add_action(tid, url, method, post, fcallback) | 75 function http_add_action(tid, url, method, post, fcallback) |
| 76 local request = http.request(url, { headers = http_headers or {}, body = http.formencode(post or {}), method = method or "GET" }, function(response, code, request) http_action_callback(response, code, request, fcallback) end); | 76 local request = http.request(url, { headers = http_headers or {}, body = http.formencode(post or {}), method = method or "GET" }, function(response_body, code, response, request) http_action_callback(response_body, code, request, fcallback) end); |
| 77 http_queue[request] = tid; | 77 http_queue[request] = tid; |
| 78 timer.add_task(http_timeout, function() http.destroy_request(request); end); | 78 timer.add_task(http_timeout, function() http.destroy_request(request); end); |
| 79 return true; | 79 return true; |
| 80 end | 80 end |
| 81 | 81 |
