Copy mashify middleware from faraday_middleware