DEV Community

Cover image for How to fetch your posts
Luthfi Afriansyah
Luthfi Afriansyah

Posted on

How to fetch your posts

Do you want to get the datas of your posts? Here's a quick tutorial :

Fetch the api using Javascript built in function fetch.

  .then(res => res.json())
  .then(data => console.log(data))
Enter fullscreen mode Exit fullscreen mode

You can apply the codes above by changing the username and change the then(data => ...) depend on what Javascript framework you're using.

Top comments (0)