function callWSSaveProductList(param) {

    const localrequestFields = {
      verb: 'POST',
      path: '/redify_productmanage/savePoductList',
      params: param
    };
  const { verb, path, params } = localrequestFields;
    // const verb='POST';
    // const path='/redify_productmanage/savePoductList';

    console.log("callWSSaveProductList=",localrequestFields);

    const fetchOptions = {
      method: 'POST',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json'
      },
      credentials: 'include',
      body: JSON.stringify(param)
    }
  
    // if (verb !== 'GET') {
      // fetchOptions['body'] = JSON.stringify(params,null,2);
    // }
  
    return dispatch => {
      dispatch(requestStartAction());
  
      return fetch(`${path}`, fetchOptions)
        .then(response => response.json())
        .then(json =>{ 
            // dispatch(requestCompleteAction(json));
            dispatch(productManageSave(json));
          } )
        .catch(error => {
          dispatch(requestErrorAction(error));
        });
    };
}
/**
 * Call to Save the Product List to the DB on server.
 * @param {*} requestFields 
 */
Call to Save the Product List to the DB on server.
@param {*} requestFields
Call to Save the Product List to the DB on server . @param { * } requestFields
function callWSSaveProductList(param) {
    const localrequestFields = {
      verb: 'POST',
      path: '/redify_productmanage/savePoductList',
      params: param
    };
  const { verb, path, params } = localrequestFields;
    console.log("callWSSaveProductList=",localrequestFields);
    const fetchOptions = {
      method: 'POST',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json'
      },
      credentials: 'include',
      body: JSON.stringify(param)
    }
    return dispatch => {
      dispatch(requestStartAction());
      return fetch(`${path}`, fetchOptions)
        .then(response => response.json())
        .then(json =>{ 
            dispatch(productManageSave(json));
          } )
        .catch(error => {
          dispatch(requestErrorAction(error));
        });
    };
}
function callWSSaveProductList ( param ) { const localrequestFields = { verb : 'POST' , path : '/redify_productmanage/savePoductList' , params : param } ; const { verb , path , params } = localrequestFields ; console . log ( "callWSSaveProductList=" , localrequestFields ) ; const fetchOptions = { method : 'POST' , headers : { 'Accept' : 'application/json' , 'Content-Type' : 'application/json' } , credentials : 'include' , body : JSON . stringify ( param ) } return dispatch => { dispatch ( requestStartAction ( ) ) ; return fetch ( ` ${ path } ` , fetchOptions ) . then ( response => response . json ( ) ) . then ( json => { dispatch ( productManageSave ( json ) ) ; } ) . catch ( error => { dispatch ( requestErrorAction ( error ) ) ; } ) ; } ; }
Call to Save the Product List to the DB on server.
Call to Save the Product List to the DB on server .
// const verb='POST'; // const path='/redify_productmanage/savePoductList'; // if (verb !== 'GET') { // fetchOptions['body'] = JSON.stringify(params,null,2); // } // dispatch(requestCompleteAction(json));