lib/contentful/client.rb
def request_headers
      headers = { 'X-Contentful-User-Agent' => contentful_user_agent }
      headers['Authorization'] = "Bearer #{configuration[:access_token]}" if configuration[:authentication_mechanism] == :header
      headers['Content-Type'] = "application/vnd.contentful.delivery.v#{configuration[:api_version].to_i}+json" if configuration[:api_version]
      headers['Accept-Encoding'] = 'gzip' if configuration[:gzip_encoded]
      headers
    end
def request_headers
      headers = { 'X-Contentful-User-Agent' => contentful_user_agent }
      headers['Authorization'] = "Bearer #{configuration[:access_token]}" if configuration[:authentication_mechanism] == :header
      headers['Content-Type'] = "application/vnd.contentful.delivery.v#{configuration[:api_version].to_i}+json" if configuration[:api_version]
      headers['Accept-Encoding'] = 'gzip' if configuration[:gzip_encoded]
      headers
    end
def request_headers headers = { 'X-Contentful-User-Agent' => contentful_user_agent } headers [ 'Authorization' ] = "Bearer #{configuration[:access_token]}" if configuration [ :authentication_mechanism ] == :header headers [ 'Content-Type' ] = "application/vnd.contentful.delivery.v#{configuration[:api_version].to_i}+json" if configuration [ :api_version ] headers [ 'Accept-Encoding' ] = 'gzip' if configuration [ :gzip_encoded ] headers end
Returns the headers used for the HTTP requests
 @private
Returns the headers used for the HTTP requests