wow-xhr icon indicating copy to clipboard operation
wow-xhr copied to clipboard

Mocked Fetch API returns an empty response

Open MaxwelSant opened this issue 2 years ago • 0 comments

Hello, I'm getting an undefined response when call mocked endpoint with fetch API

fetch(endpoint).then(response => {
   console.log({ response }); // 👈 response undefined
   return response.json();
}

I'm not sure if the data is being set when resolving the promise in XhrMock#afterXHR What do you think?

MaxwelSant avatar Aug 06 '22 20:08 MaxwelSant