     url_parts = ["#{uri}.json", params]
   else
     url_parts = ["#{uri}/#{requestConfig.method}.json", params]
+    requestConfig.mockMethod = requestConfig.method
     requestConfig.method = 'GET'
+
 
   requestConfig.url = _.compact(url_parts).join('?')
 

  payload = if response.config.data then JSON.parse(response.config.data) else {}
  response.data = _.extend({}, response.data, payload)

setUpXHRInterceptors = ->
  axios.interceptors.request.use (requestConfig) ->
    AppActions.queRequest(requestConfig)

    makeLocalRequest(requestConfig) if IS_LOCAL

    requestConfig

  axios.interceptors.response.use (response) ->
    {status, statusText, config} = response
    AppActions.setServerSuccess(status, statusText, config)

    makeLocalResponse(response) if IS_LOCAL

    response

  , (errorResponse) ->

    if _.isError(errorResponse)
      errorResponse =
        status: 1
        statusText: "#{errorResponse.name}: #{errorResponse.message}"
    else
      {status, statusText, config} = errorResponse
      AppActions.setServerError(status, statusText, config)

    Promise.reject(errorResponse)

apiHelper = (Actions, listenAction, successAction, httpMethod, pathMaker, options) ->
  listenAction.addListener 'trigger', (args...) ->

      requestConfig = _.extend({url}, opts, options)
      return if AppStore.isPending(requestConfig)

      resolved = ({data}) ->
        successAction(data, args...)

      rejected = (response) ->
        {status, statusText, statusMessage, handled} = response

        AppActions.setServerError(status, statusText, requestConfig)
        return if handled

        Actions.FAILED(status, statusMessage, args...)

      axios(requestConfig)
        .then(resolved, rejected)
