Before shopify-api-ruby v10 upgrade, you can set the Rest API request headers directly in the initializer:
ShopifyAPI::Base.header['Header'] = 'value'
After the v10 upgrade, it looks like we don’t have a way to set headers on any Rest Resource calls anymore, you can only use extra headers if you use the actual Rest Client ..
########### Using Rest Resource:
ShopifyAPI::Rest::Product.all
# There is no option to pass in any extra header information because ShopifyAPI::Rest::Base.request doesn't accept it
Issue summary
Before
shopify-api-ruby
v10 upgrade, you can set the Rest API request headers directly in the initializer:ShopifyAPI::Base.header['Header'] = 'value'
After the v10 upgrade, it looks like we don’t have a way to set headers on any Rest Resource calls anymore, you can only use extra headers if you use the actual Rest Client ..
ShopifyAPI::Rest::Base.request <- Doesn’t accept extra headers when making any requests ShopifyAPI::Clients::Rest::Admin.make_request <- Accepts extra headers when making requests
shopify_api
version: since v10Expected behavior
There should be at least feature parity for the Rest client vs Rest resources. We should add extra header support for Rest resources.