Module: makeRestCall

rest call function

Methods

(static) makeRestCall(dispatch) → {function}

Make REST call

Parameters:
Name Type Description
dispatch function

The dispatch function of the redux store

Returns:
  • A function with the following signature: function(uriPath: String, config: Object, requestActionFun: Function, responseActionFun: Function), where uriPath is the URI of the REST endpoint to call, config is the config parameters of call, such as method, headers, etc., the two last parameters are redux action functions. requestActionFun will be called immediately before the REST call started, and the responseActionFun will be called with the REST response including the status and the body.
Type
function