mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init activity starting from course
This commit is contained in:
parent
a21ccb3626
commit
cf7285b6f9
8 changed files with 247 additions and 70 deletions
13
front/services/utils/requests.ts
Normal file
13
front/services/utils/requests.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export const RequestBody = (method: string, data: any) => {
|
||||
let HeadersConfig = new Headers({ "Content-Type": "application/json" });
|
||||
let options: any = {
|
||||
method: method,
|
||||
headers: HeadersConfig,
|
||||
redirect: "follow",
|
||||
credentials: "include",
|
||||
};
|
||||
if (data) {
|
||||
options.body = JSON.stringify(data);
|
||||
}
|
||||
return options;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue