mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
10 lines
287 B
JavaScript
10 lines
287 B
JavaScript
export const post = (url, params) =>
|
|
fetch(url, {
|
|
method: 'post',
|
|
cache: 'no-cache',
|
|
headers: {
|
|
Accept: 'application/json',
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(params),
|
|
}).then(res => (res.status === 200 ? res.json() : null));
|