[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: sending credential info using luaxmlrpc
- From: "Keith Pimmel" <pimmel@...>
- Date: Tue, 3 Jun 2008 08:22:42 -0500
Hi Pete,
Do you have a published API with which you're trying to interact?
As an example, I used Confluence's remote API [1] with LuaXMLRPC, and
it worked fine. The Confluence API has a login call which returns a
session id string, which is used as a key in all subsequent
interactions for that session. An example code snippet follows:
--[[---------------------------------------------------------------------------------------------------------------
require'xmlrpc.http'
local server = 'http://localhost:8080/rpc/xmlrpc'
local user = 'admin'
local password = 'admin'
local space = 'cmt'
-- Login to confluence as user
local ok, token = xmlrpc.http.call(server,'confluence1.login','admin','admin')
if ok ~= true then
error('Failed to connect to confluence server')
end
local pp = {}
ok,pp = xmlrpc.http.call(server, 'confluence1.getPage', token, space, parent)
-- etc...
---------------------------------------------------------------------------------------------------------------]]--
[1] http://confluence.atlassian.com/display/DOC/Remote+API+Specification
--
Keith Pimmel