Dio: How do i send multiple requests with Dio Simultaneously?

Created on 28 Jan 2019  ·  4Comments  ·  Source: flutterchina/dio

I really want to commend the great work done with this package. Please how do i send multiple requests using Dio.

Most helpful comment

 response = await Future.wait([dio.post("/info"), dio.get("/token")]);

All 4 comments

A dio instance can send multiple requests.

var dio = new Dio();
dio.get(...).then(...);
dio.post(...).then(...);
...

Sorry i meant sending multiple requests simultaneously.

 response = await Future.wait([dio.post("/info"), dio.get("/token")]);

This is exactly what i've been looking for. Thanks immensely @wendux for this great information.

I really appreciate.

Was this page helpful?
0 / 5 - 0 ratings