class FlexCommerceApi::JsonApiClientExtension::JsonFormatMiddleware
@!visibility private This class is used internally to modify the URL to have .json at the end to suit the flex platform.
Public Instance Methods
call(env)
click to toggle source
Adds .json to the URL before it gets sent
# File lib/flex_commerce_api/json_api_client_extension/json_format_middleware.rb, line 12 def call(env) env.url.tap do |url| url.path << ".json_api" unless url.path=~/\.json_api$/ end @app.call(env) end