Class: Smsapi::Server::Connection
- Inherits:
-
Object
- Object
- Smsapi::Server::Connection
- Defined in:
- lib/smsapi/server/connection.rb
Instance Method Summary collapse
-
#initialize(uri, port, token) ⇒ Connection
constructor
A new instance of Connection.
- #post(path, params) ⇒ Object
Constructor Details
#initialize(uri, port, token) ⇒ Connection
Returns a new instance of Connection.
7 8 9 10 11 12 |
# File 'lib/smsapi/server/connection.rb', line 7 def initialize(uri, port, token) @http = Net::HTTP.new(uri, port) @http.use_ssl = true @http.verify_mode = OpenSSL::SSL::VERIFY_NONE @token = token end |
Instance Method Details
#post(path, params) ⇒ Object
14 15 16 |
# File 'lib/smsapi/server/connection.rb', line 14 def post(path, params) @http.request post_request(path, params) end |