Closed Etio39 closed 5 years ago
@Etio39 It looks like the web server may not be returning json. Do you know what the server returns?
Also, from your screenshot, your login endpoint does NOT accept json, it looks like you're doing form encoded where the value of user is json.
@sean7512 Thanks for your repply.
Here is what the server returns :
{
"status": "success",
"user": {
"emailAddress": "emailAdress",
"password": "password",
"id": 27,
"token": "token",
"firstName": "firstName",
"lastName": "lastName",
"gender": "Mr",
"birthDate": ""
}
}
So yes, it is JSON.
I thinks, as you said, that the problem comes from the login endpoint.
Thanks for your help.
@Etio39 let me know if you need this issue opened. I believe the issue is the login endpoint not accepting json.
If you can't change the endpoint, then you may want to look into another library, as RestEssentials does not currently support sending data as form-encoded.
@sean7512 since the error is from my side, yes you can close the issue. Thanks for helping me.
I'll check if the endpoint can be changed as I really like to work with your library !
Thank you.
@Etio39 Awesome, good luck and thank you!
Hi Sean, First of all, thanks for your work.
I'm trying to make a POST request but I'm struggling ..
Using Postman, this is what I need to request :
So this is the code I'm using, based on your example :
And when I'm trying to execute I'm getting this error :
I hope that you can help me to understand my mistake.
Thanks in advance, Etienne.