Skip to content

Commit

Permalink
no-cors
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Sep 4, 2024
1 parent 8428ab1 commit 5d45bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/ProductList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { useEffect } from 'react'
const BASE_URL = 'https://3dprinter-web-api.benhalverson.workers.dev/list'

const getData = async () => {
const response = await fetch(BASE_URL)
const response = await fetch(BASE_URL, {
mode: 'no-cors',
})
const data = await response.json()
console.log('data', data)
return data
Expand Down

0 comments on commit 5d45bd5

Please sign in to comment.