Files
supabase/apps/docs/lib/fetchWrappers.tsx
T
Charis 10da8f3f31 Revert "feat: display api urls and keys instead of placeholders in do… (#20302)
Revert "feat: display api urls and keys instead of placeholders in docs (#19672)"

This reverts commit 0e8ee2e890.
2024-01-10 05:45:44 -05:00

19 lines
444 B
TypeScript

interface DataProps {
[prop: string]: any
}
export const post = (url: string, data: DataProps, options = {}) => {
return fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
referrerPolicy: 'no-referrer-when-downgrade',
body: JSON.stringify(data),
...options,
}).catch((error) => {
console.error('Error at fetchWrapper - post:', error)
})
}