Module: Vindi::Connection
- Included in:
- Request
- Defined in:
- lib/vindi/connection.rb
Instance Method Summary collapse
-
#http_client ⇒ Object
HTTP client for the Vindi API.
- #last_response ⇒ Object
Instance Method Details
#http_client ⇒ Object
HTTP client for the Vindi API
14 15 16 17 18 19 20 21 22 |
# File 'lib/vindi/connection.rb', line 14 def http_client @http_client = Faraday.new(api_endpoint, ) do |http| http.request(:multipart) http.request(:url_encoded) http.set_basic_auth(@key, '') http.builder.use @middleware http.adapter(Faraday.default_adapter) end end |
#last_response ⇒ Object
24 25 26 |
# File 'lib/vindi/connection.rb', line 24 def last_response @last_response if defined?(@last_response) end |