I am attempting to use fetch as follows
export function* loadData() {
console.log("Saga: Loading Data...");
try {
const response = yield call(request, requestURL,
{ method: 'GET', credentials: 'include', headers: {
'Content-Type': 'application/json', } });
// Nothing past this point is ever touched
if (response.success) {
console.log("SUCCESS!!!!");
...
export default function request(url, options) {
return fetch(url, options)
.then(checkStatus)
.then(parseJSON);
}
CheckStatus confirms a successful status on the data
function parseJSON(response) {
if (response.status === 204 || response.status === 205) {
return null;
}
var responseClone = response.clone();
console.log(responseClone.json());
return response.json();
}
Not enough rep to post a screenshot of the clone output, but essentially chrome dev outputs
SAGA: Loading Data...
[[PromiseStatus]]:"resolved"
[[PromiseValue]]:Object
And the object contains all the data I need, the code just wont continue past that response call.