Method: EasyLlama::Client::Api#send_request
- Defined in:
- lib/easyllama/api.rb
#send_request(path: nil, method: :get, body: nil) ⇒ Net::HTTPResponse
Sends an HTTP request to the specified path.
26 27 28 29 30 31 32 |
# File 'lib/easyllama/api.rb', line 26 def send_request(path: nil, method: :get, body: nil) raise ArgumentError, 'Please provide EasyLlama::Client.api_token' if @token.nil? uri = build_uri(path) request = build_request(uri, method, body) execute_request(uri, request) end |