I'm actually trying to get a response from my endpoint, but I'm facing a weird issue, I'm getting a 406 HTTP code in Retrofit response.
This is the body of my request I'm sending:
{
"login":"34413",
"otp":"51131"
}
when I send to correct OTP, I get the response from my endpoint
{
"statusResponse": {
"statusCode": 200,
"success": succes
},
"person": [object person],
"token": "...."
}
but in case I'm sending the wrong OTP number, I get a retrofit response code 406 which means I didn't receive anything from my endpoint.
NB : when i try my request from SOAP UI both case works fine and this is the response of wrong otp case :
{
"statusResponse": {
"statusCode": 406,
"success": false
},
"person": null,
"token": null
}
Do you have any idea what causing the issue?