mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
19 lines
400 B
TypeScript
19 lines
400 B
TypeScript
export function post(path: string, data: any) {
|
|
return fetch('http://localhost:5000/api' + path, {
|
|
method: 'post',
|
|
body: JSON.stringify(data),
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
});
|
|
}
|
|
|
|
export function delete$(path: string, data: any) {
|
|
return fetch('http://localhost:5000/api' + path, {
|
|
method: 'delete',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
});
|
|
}
|