mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: use requests with auth header for home
This commit is contained in:
parent
3457b57c58
commit
9f28dfe7e8
7 changed files with 83 additions and 40 deletions
|
|
@ -12,8 +12,7 @@ export async function loginAndGetToken(username: string, password: string): Prom
|
|||
// Request Config
|
||||
|
||||
// get origin
|
||||
const origin = window.location.origin;
|
||||
const HeadersConfig = new Headers({ "Content-Type": "application/x-www-form-urlencoded" , Origin: origin });
|
||||
const HeadersConfig = new Headers({ "Content-Type": "application/x-www-form-urlencoded" });
|
||||
const urlencoded = new URLSearchParams({ username: username, password: password });
|
||||
|
||||
const requestOptions: any = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue