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
10 11 12 13 14 15 16 17 18 |
# File 'lib/vindi/connection.rb', line 10 def http_client @http_client = Faraday.new(api_endpoint, ) do |http| http.request(:multipart) http.request(:url_encoded) http.request(:basic_auth, @key, '') http.builder.use @middleware http.adapter(Faraday.default_adapter) end end |
#last_response ⇒ Object
20 21 22 |
# File 'lib/vindi/connection.rb', line 20 def last_response @last_response if defined?(@last_response) end |