I’m currently working on my weather project, and I’m having trouble with my API call. Instead of using jquery I’ve decided to push myself and use vanilla js. I’m trying to wrap my brain around the new Fetch API, which in turn means I’m getting a bit of a crash course on Promises vs XMLHttpRequest.
I’ve gotten as far as it giving me a status code of “0”, but that doesn’t tell me much other than I personally am doing something wrong vs it being a server issue. The calls themselves are actually showing on my API usage dashboard though, so in some capacity they’re going through.
All I’m trying to do here is get the console to log the returned json. Where am I going wrong?