php flutter mac xampp dio

44 views
Skip to first unread message

programadores ancestrales

unread,
Mar 11, 2021, 3:39:49 PM3/11/21
to flutt...@googlegroups.com

Dear:

I am trying to contact XAMPP via flutter


    String url ="http://10.0.2.2:5037/fler/lst_nomina_solicitantes.php?";

   String param = "usuarioDB=${VarGlo.usuarioDB}&ClaveDB=+&situacion_solicitante=0";


   try {

     Response response;

     Dio dio = new Dio();

     response = await dio.get('$url$param');

  

     print(response);

     print(response.data.toString());

   } on Exception catch (exception) {

    print("excepcion ..>$exception");

} catch (error) {

    print("error..> error");

}


generates error

excepcion ..>DioError [DioErrorType.DEFAULT]: HttpException: Connection closed before full header was received, uri = http://10.0.2.2:5037/fler/lst_nomina_solicitantes.php?usuarioDB=root&ClaveDB=+&situacion_solicitante=0





The key is empty since it is local

Anyone know what I have bad?

Thanks


Max

Suzuki Tomohiro

unread,
Mar 11, 2021, 5:36:04 PM3/11/21
to programadores ancestrales, flutt...@googlegroups.com
What’s the error message in PHP?

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAKgCHzCKV5bS8_cUQjx9jJ%3DHUjm12H1M8_%2BwTWdJO0BdMGDMBw%40mail.gmail.com.

programadores ancestrales

unread,
Mar 11, 2021, 5:46:19 PM3/11/21
to Suzuki Tomohiro, flutt...@googlegroups.com
Php service works fine with old version of flutter
I did it with http.get but I did not find how to make it work

Suzuki Tomohiro

unread,
Mar 11, 2021, 5:50:57 PM3/11/21
to programadores ancestrales, flutt...@googlegroups.com
Do you see PHP service receives the request from Flutter?
Reply all
Reply to author
Forward
0 new messages