mirror of
https://github.com/logos-messaging/logos-messaging-frontend.git
synced 2026-01-02 13:53:13 +00:00
25 lines
654 B
TypeScript
25 lines
654 B
TypeScript
export const http = {
|
|
post(url: string, body: any) {
|
|
return fetch(new URL(url), {
|
|
method: "POST",
|
|
mode: "no-cors",
|
|
referrerPolicy: "no-referrer",
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
body: JSON.stringify(body)
|
|
});
|
|
},
|
|
delete(url: string, body: any) {
|
|
return fetch(new URL(url), {
|
|
method: "DELETE",
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
body: JSON.stringify(body)
|
|
});
|
|
},
|
|
get(url: string) {
|
|
return fetch(new URL(url));
|
|
}
|
|
}; |