Correcting previous mistake with var-arg calls
parent
4074493524
commit
1aa151ad3b
|
@ -4,7 +4,7 @@
|
|||
-- $Id$
|
||||
---------------------------------------------------------------------
|
||||
|
||||
local error, select, tonumber, tostring, unpack = error, select, tonumber, tostring, unpack
|
||||
local error, tonumber, tostring, unpack = error, tonumber, tostring, unpack
|
||||
|
||||
local ltn12 = require"ltn12"
|
||||
local request = require"socket.http".request
|
||||
|
@ -22,9 +22,8 @@ module("xmlrpc.http")
|
|||
-- XML-RPC element).
|
||||
---------------------------------------------------------------------
|
||||
function call (url, method, ...)
|
||||
local n = select ('#', ...)
|
||||
local request_sink, tbody = ltn12.sink.table()
|
||||
local request_body = xmlrpc.clEncode(method, unpack (..., 1, n))
|
||||
local request_body = xmlrpc.clEncode(method, ...)
|
||||
local err, code, headers, status = request {
|
||||
url = url,
|
||||
method = "POST",
|
||||
|
|
Loading…
Reference in New Issue