Open Petri-Oosthuizen opened 3 years ago
Hi,
I'm also facing with same issue. Mobile side it is ok but on Web 401 responses are not catch.
Im not sure that it is about GetX or Flutter itself. Any suggestions?
I decided to go with Dio.
So, is there any problem with dio?
I haven’t had any.
I have tried it with Dio. Same error occurs on Dio also. status =401 on mobile. error on web. I think it is about Flutter itself.
Have you tried using request
methode instead of post
:
Future<Response> login({required String email, password}) => request(
"https://example.com/users/login",
"POST",
query: <String, String>{"email": email, "password": password},
);
@RaphaelArabeyre same result
Take a basic log in post call:
When this REST call fails (401) the following error response is returned on mobile:
The following response is however received in the browser:
<error>:<getObject: NoSuchMethodError: The getter 'classRef' was called on null.>
The error can however be seen in the browser console: