How to use Dart.Dio to make a get request by passing parameters on the body?

Asked

Viewed 13 times

0

Problem happens with flutter, using the Dio 4.0.0 package I am using it as follows, however it presents error 414 (Dioerrortype.Response).

Ps.: Using Postman with same address and parameter values in BODY/Raw works normally.

I found some examples, however they do not apply in this version 4.0.0

var params = new Map<String, dynamic>();
    params['login'] = login;
    params['senha'] = senha;

Response<dynamic> response = await dio.request(
        '/usuarios/',        
        data: params
        );

Código flutter Utilizando Postman

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.