DEV Community

Discussion on: What the Fetch

Collapse
 
bias profile image
Tobias Nickel

you might change the parameter 'e' to url in getData and postData, otherwise you will only use the 'url' from the outer scope.

other then that the methods are very handy and can help to write cleaner code.

thanks for sharing

Collapse
 
ignoreintuition profile image
Brian Greig

Good eye. I completely missed that because the code executed using the globally scoped variable. It is fixed now. Thanks.