Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Likewise, every response I get is JSON.

fetch responses have a .json() method. It's literally the first example in MDN: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/U...

It's literally easier than not using JSON because I have to think about if I want `repsponse.text()` or `response.body()`.

 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: