We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello json-server-auth team,
Context: Receive 400 error so I can understand I send a bad request. However seems everything fine in my side. So please tell me if I miss something.
My log track the following output: POST /login 400 1.362 ms - 20
POST /login 400 1.362 ms - 20
Code: Request API url :
` const authEndpoint = "http://localhost:3000/login"
fetch(authEndpoint, { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json',
}, body: JSON.stringify({ email: this.state.email, password: this.state.password, }), }).then((response) => { console.log(response.status) response.status}) .catch((error) => { console.error(error); });`
My db.json config file:
` { "signal": [ { "id": 1, "category": "Fuite d'eau", "user": "david@gmail.com", "description": "Fuite d'eau issuen de l'étage 2" } ],
"login":[ {"email": "test@test.com", "name": "David", "lastname": "M", "password":"test"}, {"email": "david@gmail.com", "name": "David", "lastname": "M", "password":"weloveyou"}, {"email": "remi@test", "name": "Remi", "lastname": "P", "password":"weloveyou"}, {"email": "thomas@test", "name": "Thomas", "lastname": "S", "password":"weloveyou"} ]
} `
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
No branches or pull requests
Hello json-server-auth team,
Context:
Receive 400 error so I can understand I send a bad request. However seems everything fine in my side. So please tell me if I miss something.
My log track the following output:
POST /login 400 1.362 ms - 20
Code:
Request API url :
`
const authEndpoint = "http://localhost:3000/login"
fetch(authEndpoint, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
My db.json config file:
`
{
"signal": [
{ "id": 1, "category": "Fuite d'eau", "user": "david@gmail.com", "description": "Fuite d'eau issuen de l'étage 2" }
],
}
`
The text was updated successfully, but these errors were encountered: