Fullstack Web

9 articles 路 all categories

1 article from November 2016 show all

How to waste hours of life with fetch() and a bit of brainfart

Both superagent and fetch() enable you to talk to a server. The first produces clean code that gets nesty if you need many things. The second produces clean code that is Promis-y and sometimes cumbersome. The difference between superagent and fetch() isn't that one sends your headers as-given and the other lowercases their names. The difference is that superagent sends a cookie and fetch() doesn't!