From d2a7d09ed83f62ad60f7ecd587e0fbfd79aa9005 Mon Sep 17 00:00:00 2001 From: fiqryq Date: Mon, 22 Aug 2022 18:54:40 +0700 Subject: [PATCH] docs: update readme --- README.md | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/README.md b/README.md index cb04d5e..9f20c24 100644 --- a/README.md +++ b/README.md @@ -15,55 +15,6 @@ npm run dev - Integrate with [Tailwind CSS](https://tailwindcss.com/) - Prettier plugin tailwindcss - SEO with tag Next `` -- Fetcher utils - -## Utils Usage - -`fetch.ts` - -```ts -// GET -fetchData: async () => { -const options = { - method: "GET", - headers: { - "Content-Type": "application/json", - Authorization: '', - }, - url: 'https://yourendpoint.com', -}; - -fetch(options) - .then((response) => { - console.log(response); - }) - .catch((err: any) => { - console.log(err); - }); -}, - -// POST -createData: async (payload: any) => { -const options = { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - 'Accept-Language': 'id', - Authorization: '' - }, - url: 'https://yourendpoint.com', - data: payload, - }; - fetch(options) - .then((response) => { - console.log(response) - }) - .catch((err: any) => { - console.log(err) - }); - }, -``` ### Folder Structure