Module: Rapuncel::Adapters::NetHttpAdapter

Included in:
Client
Defined in:
lib/rapuncel/adapters/net_http_adapter.rb

Defined Under Namespace

Classes: HttpResponse

Instance Method Summary collapse

Instance Method Details

#send_method_call(str) ⇒ Object

Dispatch a XMLRPC via HTTP and return a response object.



27
28
29
30
31
32
33
# File 'lib/rapuncel/adapters/net_http_adapter.rb', line 27

def send_method_call str
  request = Net::HTTP.new connection.host, connection.port
  request.use_ssl = connection.ssl?
  request.basic_auth connection.user, connection.password if connection.auth?

  HttpResponse.new request.post(connection.path, str, connection.headers)
end