Sha256: 6d8938b2626e5615424055cd602024693b190e2d3517a7627bc8463d6f1778bd
Contents?: true
Size: 504 Bytes
Versions: 5
Compression:
Stored size: 504 Bytes
Contents
module FlexCommerceApi module JsonApiClientExtension # # # @!visibility private # This class is used internally to modify the URL to have .json at the end to # suit the flex platform. class JsonFormatMiddleware < ::Faraday::Middleware # # Adds .json to the URL before it gets sent # def call(env) env.url.tap do |url| url.path << ".json_api" unless url.path=~/\.json_api$/ end @app.call(env) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems