Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login no working #107

Open
Gw0zdziu opened this issue Sep 13, 2023 · 1 comment
Open

Login no working #107

Gw0zdziu opened this issue Sep 13, 2023 · 1 comment

Comments

@Gw0zdziu
Copy link

No description provided.

@amarphule
Copy link

amarphule commented Sep 22, 2023

@Gw0zdziu I faced the same issue solved by adding headers in a POST request
here is my code

fetch("https://fakestoreapi.com/auth/login", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        username: "mor_2314",
        password: "83r5^_",
      }),
    })
      .then((res) => res.json())
      .then((json) => console.log(json)); 

Hope this will help, Happy coding 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants