C
cooper bethea
Hi everybody -
I've been playing with 37signals' new Backpack XML-RPC API -
http://www.backpackit.com/api/ - and it's giving me a bit of a problem.
Apparently my use of XMLRPC::Client#call returns a RuntimeError that
contains ""HTTP-Error: 302 Found" but no URI to redirect to. Is there a
way to work around this? I've pasted code below - note that if you just
plug this in and try it it won't work for you; the xml api requires an
sha-1 hash supplied with "token".
Any suggestions?
--
#!/usr/local/bin/ruby
require 'xmlrpc/client'
require 'rexml/document'
token = ''
headers = Hash.new
headers['X-POST_DATA_FORMAT'] = 'xml'
server = XMLRPC::Client.new("cooper.backpackit.com",
"/ws/tags/select/3165")
server.http_header_extra = headers
begin
tags = server.call("token", token)
rescue RuntimeError => e
p e.message
end
p tags
--
I've been playing with 37signals' new Backpack XML-RPC API -
http://www.backpackit.com/api/ - and it's giving me a bit of a problem.
Apparently my use of XMLRPC::Client#call returns a RuntimeError that
contains ""HTTP-Error: 302 Found" but no URI to redirect to. Is there a
way to work around this? I've pasted code below - note that if you just
plug this in and try it it won't work for you; the xml api requires an
sha-1 hash supplied with "token".
Any suggestions?
--
#!/usr/local/bin/ruby
require 'xmlrpc/client'
require 'rexml/document'
token = ''
headers = Hash.new
headers['X-POST_DATA_FORMAT'] = 'xml'
server = XMLRPC::Client.new("cooper.backpackit.com",
"/ws/tags/select/3165")
server.http_header_extra = headers
begin
tags = server.call("token", token)
rescue RuntimeError => e
p e.message
end
p tags
--