After a lot of browsing and reading docs, I came across this answer, which worked until I upgraded flutter.
My current issue is that the credentials do not reach my server. IntelliJ error:
I/FlutterActivityDelegate( 6944): onResume setting current activity to this
D/EGL_emulation( 6944): eglMakeCurrent: 0xa7f852a0: ver 2 0 (tinfo 0xa7f83250)
I/flutter ( 6944): doing login with credentials:: W and T
I/flutter ( 6944): my_response is:: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
I/flutter ( 6944): <title>429 Too Many Requests</title>
I/flutter ( 6944): <h1>Too Many Requests</h1>
I/flutter ( 6944): <p>1 per 1 minute</p>
E/flutter ( 6944): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter ( 6944): type '(Exception) => void' is not a subtype of type '(Object) => FutureOr<dynamic>'
My server output for the request is:
credentials:: -
192.168.1.175 - - [12/May/2018 10:56:23] "GET /users/login HTTP/1.1" 401 -
192.168.1.175 - - [12/May/2018 10:56:23] "GET /users/login HTTP/1.1" 429 -
LE: the "credentials:: - " is a print done in the authentication level of the server. LLE: a curl request is working just fine
curl -u 123456:password http://localhost:5000/users/login
{
"is_logged_in": true,
"last_login": 1525980360
}
Response is:
credentials:: 123456 - password
127.0.0.1 - - [12/May/2018 13:00:50] "GET /users/login HTTP/1.1" 200 -
I am using the exact same code as in the link provided above.