Class: WitBot::WitRequestSender
- Inherits:
-
Object
- Object
- WitBot::WitRequestSender
- Defined in:
- lib/wit_bot/requests/wit_request_sender.rb
Instance Method Summary collapse
- #close ⇒ Object
- #http ⇒ Object
-
#initialize ⇒ WitRequestSender
constructor
A new instance of WitRequestSender.
Constructor Details
#initialize ⇒ WitRequestSender
Returns a new instance of WitRequestSender.
4 5 6 7 8 9 10 |
# File 'lib/wit_bot/requests/wit_request_sender.rb', line 4 def initialize @http = HTTP[ Accept: "application/vnd.wit.#{WitBot.config.version}+json", Authorization: "Bearer #{WitBot.config.token}" ] .persistent(WitBot.config.host) end |
Instance Method Details
#close ⇒ Object
14 15 16 |
# File 'lib/wit_bot/requests/wit_request_sender.rb', line 14 def close @http.close end |
#http ⇒ Object
11 12 13 |
# File 'lib/wit_bot/requests/wit_request_sender.rb', line 11 def http @http end |