Class: Exchanger::Client
- Inherits:
-
Object
- Object
- Exchanger::Client
- Defined in:
- lib/exchanger/client.rb
Overview
SOAP Client for Exhange Web Services
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
-
#request(post_body, headers) ⇒ Object
Does the actual HTTP level interaction.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 12 |
# File 'lib/exchanger/client.rb', line 6 def initialize @client = HTTPClient.new @client.debug_dev = STDERR if debug @client.set_auth nil, username, password if username @client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE if insecure_ssl @client.ssl_config.ssl_version = ssl_version if ssl_version end |
Instance Method Details
#request(post_body, headers) ⇒ Object
Does the actual HTTP level interaction.
15 16 17 18 |
# File 'lib/exchanger/client.rb', line 15 def request(post_body, headers) response = @client.post(endpoint, post_body, headers) return { :status => response.status, :body => response.content, :content_type => response.contenttype } end |