strapi / community-content

Contribute and collaborate on educational content for the Strapi Community
https://strapi.io/write-for-the-community
572 stars 402 forks source link

[REQUEST NEW CONTENT] Mastering API Requests: Using Fetch with Strapi's Content API #1451

Closed Theodore-Kelechukwu-Onyejiaku closed 2 months ago

Theodore-Kelechukwu-Onyejiaku commented 4 months ago

Hello 👋,

We would love to have an in-dept content on using fetch() with Strapi. It should cover how to query the Content API, Making GET Requests with Fetch, Sending POST Requests with Fetch, Updating and Deleting with PUT and DELETE Requests, Authentication and Authorization, File uploads, some Strapi internals like populations and filters, pagination, sorting, etc. Thank you! Depending on the effort and quality put into this, we could make this intermediate.

Content Brief:

Community vote

👍 Upvote if you like this topic 🚀 If you can make the article/video!

Thank you.

FINCH285 commented 4 months ago

Hello @Theodore-Kelechukwu-Onyejiaku! I would like to write this article. I will provide an outline in a few.

FINCH285 commented 4 months ago

Here is the outline I was able to come up with. Please take a look.

  1. Introduction

    • Brief overview of Strapi and its Content API
  2. Understanding Fetch

    • What is the Fetch API?
    • Advantages of using Fetch over other methods
    • Basic syntax and usage examples
  3. Setting up Strapi

    • Installing Strapi
    • Creating a new Strapi project
    • Configuring the Content API
  4. Making GET Requests with Fetch

    • Retrieving data from the Content API
    • Handling responses and errors
    • Parsing JSON data
  5. Sending POST Requests with Fetch

    • Creating new entries in the Content API
    • Sending data in the request body
    • Handling successful and failed responses
  6. Updating and Deleting with PUT and DELETE Requests

    • Using PUT requests to update existing entries
    • Deleting entries with DELETE requests
    • Error handling and best practices
  7. Authentication and Authorization

    • Implementing authentication with Strapi
    • Sending authenticated requests with Fetch
    • Handling authentication errors
  8. Advanced Topic

    • Pagination and filtering
    • Populating related data
    • Handling file uploads and downloads
  9. Conclusion

    • Recap of key points
    • Additional resources for learning
Theodore-Kelechukwu-Onyejiaku commented 4 months ago

Hi @FINCH285 ,

This looks good. Please proceed!

FINCH285 commented 3 months ago

Hello @Theodore-Kelechukwu-Onyejiaku!

I am done working on the first draft of this article. Please take a look. Here is the HackMD link:

https://hackmd.io/@denis-kuria-254/Sy4oh0sVR

FINCH285 commented 3 months ago

Hello @Theodore-Kelechukwu-Onyejiaku. Please add this to the review queue.

Theodore-Kelechukwu-Onyejiaku commented 3 months ago

Thank you @FINCH285, I have added it!

Theodore-Kelechukwu-Onyejiaku commented 3 months ago

Hi @FINCH285 ,

I hope you are doing great! For the requested content: Mastering API Requests: Using Fetch with Strapi's Content API

I have left some comments and a general review. Please incorporate them and ping me so I can publish. Thank you so much for your contribution to the "Write for the Community" program!