How do I get raw/JSON responses from the Ruby SDK?

Knowledge Drop

Last tested: Apr 18, 2018
 

You can tell the SDK client object to only return raw responses by setting the raw_responses attribute to true when you first set up authentication.

This isn't always a good idea, but it can be useful when you don't need to utilize any of the features that come with Sawyer.

 

require 'looker-sdk'

looker = LookerSDK::Client.new({

:client_id => ENV['LOOKER_ID'],

:client_seccret => ENV['LOOKER_SECRET'],

:api_endpoint => ENV['LOOKER_URL'],

:raw_responses => true

})

This content is subject to limited support.                

Version history
Last update:
‎06-14-2021 06:16 PM
Updated by: