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)
, whereuriPath
is the URI of the REST endpoint to call, config is the config parameters of call, such asmethod
,headers
, etc., the two last parameters are redux action functions.requestActionFun
will be called immediately before the REST call started, and theresponseActionFun
will be called with the REST response including the status and the body.
- Type
- function