return fetch(url, {
credentials: 'same-origin',
...options
})
.then(response => response.json())
.then(function*(response) {
console.log("httpStatusCode", response.httpStatusCode)
})
Is the above possible ? I'm not getting the consoled output when the callback function is a generator, which means that the control is not passing to the callback function(generator). The real reason I want to do it this way is that I have to call another fetch request using the 'call' helper function of redux-saga from the above callback which can be called only from a generator function.