0.01
No commit activity in last 3 years
No release in over 3 years
Monkey patches Ruby's standard XMLRPC Client to use EventMachine and fibers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

em-xmlrpc-client¶ ↑

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).

Example¶ ↑

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.

Dependencies¶ ↑

em-http-request is required if you want to use the EventMachine + Fiber aware implementation.

Author¶ ↑

Christopher J. Bottaro

https://github.com/cjbottaro

@cjbottaro

Copyright and License¶ ↑

Copyright © 2017, Christopher J. Bottaro.

This project is licensed under the MIT License.