jasonslyvia/redux-composable-fetch

unable to set options to fetch

Closed this issue · 1 comments

const FetchMiddleware = createFetchMiddleware({
  afterFetch({ action, result }) {
    return result.json().then(data => {
      return Promise.resolve({
        action,
        result: data,
      });
    });
  },
  credentials: "same-origin",
});

no credentials option here

  const { url, types, ...options } = action; // eslint-disable-line
export function loadCart() {
	return {
		types: [
			LOAD_CART, LOAD_CART_SUCCESS, LOAD_CART_ERROR
		],
		url: '/app_dev.php/shop/oneOrg/ajax/cart/',
		credentials: "same-origin",
	};
}