This gem monkey patches Ruby's built in XMLRPC::Client to be EventMachine + Fiber aware. If you are not using EventMachine (or the reactor isn't running), then it will fallback to using XMLRPC::Client's default implemenation (using Net::HTTP).
require "eventmachine" require "em-xmlrpc-client" EM.run do Fiber.new do client = XMLRPC::Client.new2("http://blah.com/api") result = client.call("someMethod", "arg1", 123) # Uses em-http-request. end.resume end client = XMLRPC::Client.new2("http://blah.com/api") result = client.call("someMethod", "arg1", 123) # Uses Net::HTTP like normal.
em-http-request is required if you want to use the EventMachine + Fiber aware implementation.
Contributing to em-xmlrpc-client
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
Fork the project
Start a feature/bugfix branch
Commit and push until you are happy with your contribution
Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2011 Christopher J. Bottaro. See LICENSE.txt for further details.