lib/pricehubble/client/utils/request.rb in pricehubble-0.4.2 vs lib/pricehubble/client/utils/request.rb in pricehubble-1.0.0
- old
+ new
@@ -6,18 +6,18 @@
# Some helpers to prepare requests in a general way.
#
module Request
extend ActiveSupport::Concern
- included do
- # A common HTTP content type to symbol
- # mapping for correct header settings.
- CONTENT_TYPE = {
- json: 'application/json',
- multipart: 'multipart/form-data',
- url_encoded: 'application/x-www-form-urlencoded'
- }.freeze
+ # A common HTTP content type to symbol
+ # mapping for correct header settings.
+ CONTENT_TYPE = {
+ json: 'application/json',
+ multipart: 'multipart/form-data',
+ url_encoded: 'application/x-www-form-urlencoded'
+ }.freeze
+ included do
# Use the configured identity to authenticate the given request.
#
# @param req [Faraday::Request] the request to manipulate
def use_authentication(req)
req.params.merge!(access_token: PriceHubble.identity.access_token)