module Magnews::HeaderHelper

Public Instance Methods

auth_header() click to toggle source
# File lib/magnews/util/header_helper.rb, line 3
def auth_header
  raise Magnews::MissingAuthToken if Magnews.auth_token.blank?
  { Authorization: "Bearer #{Magnews.auth_token}" }
end
common_headers() click to toggle source
# File lib/magnews/util/header_helper.rb, line 8
def common_headers
  auth_header.merge({ content_type: :json, accept: :json })
end