I am getting a undefined method `body' error with a faraday call to an API;
URL - https://api.company.com/api/v1/dept/person/query/empid/22435678
I need to pass a username and password through as well. Here is what I am trying. What am I doing wrong?
require 'faraday'
require 'faraday/net_http'
Faraday.default_adapter = :net_http
def show
@response = Faraday.new('https://api.company.com/api/v1/dept/person/query/empid/22435678') do |conn|
conn.request :authorization, :basic, 'testuser', '77hfhncqjwnd'
end
end