How to use the @talend/react-cmf.sagas.http function in @talend/react-cmf

To help you get started, we’ve selected a few @talend/react-cmf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / ui / packages / containers / .storybook / config.js View on Github external
function* sagaPhotoGet3() {
	const answer = yield call(sagas.http.get, 'https://jsonplaceholder.typicode.com/photos/');
	yield put(actions.collections.addOrReplace('photos3', answer.data));
}
github Talend / data-prep / dataprep-webapp / src / app / configure.cmf.js View on Github external
/**
	 * Register react-router-redux router reducer (see https://github.com/reactjs/react-router-redux)
	 */
	cmfStore.setRouterMiddleware(routerMiddleware(browserHistory));

	/**
	 * Register http middleware
	 */
	const httpMiddleWareConfig = {
		security: {
			CSRFTokenCookieKey: 'XSRF-TOKEN',
			CSRFTokenHeaderKey: 'X-XSRF-TOKEN',
		},
	};
	cmfSagas.http.setDefaultConfig(httpMiddleWareConfig);
	cmfStore.setHttpMiddleware(httpMiddleware(httpMiddleWareConfig));

	/**
	 * Register your app reducers
	 */
	let reducers = {};
	const additionalReducers = additionalConfiguration.reducers;
	if (additionalReducers) {
		reducers = {
			...additionalReducers,
		};
	}

	const sagaMiddleware = createSagaMiddleware();
	const middlewares = [sagaMiddleware];
	const additionalMiddlewares = additionalConfiguration.middlewares;
github Talend / data-prep / dataprep-webapp / src / app / configure.cmf.js View on Github external
/**
		 * Register react-router-redux router reducer (see https://github.com/reactjs/react-router-redux)
		 */
		cmfStore.setRouterMiddleware(routerMiddleware(browserHistory));

		/**
		 * Register http middleware
		 */
		const httpMiddleWareConfig = {
			security: {
				CSRFTokenCookieKey: 'XSRF-TOKEN',
				CSRFTokenHeaderKey: 'X-XSRF-TOKEN',
			},
		};
		cmfSagas.http.setDefaultConfig(httpMiddleWareConfig);
		cmfStore.setHttpMiddleware(httpMiddleware(httpMiddleWareConfig));

		/**
		 * Register your app reducers
		 */
		let reducers = {};
		const additionalReducers = additionalConfiguration.reducers;
		if (additionalReducers) {
			reducers = {
				...additionalReducers,
			};
		}

		const sagaMiddleware = createSagaMiddleware();
		const middlewares = [sagaMiddleware];
		const additionalMiddlewares = additionalConfiguration.middlewares;