class Attio::Client

def request(method, path, params_or_body = {})

def request(method, path, params_or_body = {})
  response = connection.send(method) do |req|
    req.url path
    case method
    when :get, :delete
      req.params = params_or_body if params_or_body.any?
    else
      req.body = params_or_body.to_json
    end
  end
  handle_response(response)
rescue Faraday::Error => e
  handle_error(e)
end