Closed jcarvalho-ptech closed 2 months ago
Thanks @Imgkl !
This would allow us to use any http client. An example using Chopper:
class EventFluxClientAdapter implements HttpClientAdapter {
@override
Future<StreamedResponse> send(BaseRequest request) async {
chopper.ChopperClient client = GetIt.I.get(instanceName: "chopperClient");
StreamedResponse response = (await client.send<Stream<List<int>>, String>(
chopper.Request("GET", request.url, Uri.parse(""),
headers: request.headers)))
.base as StreamedResponse;
return response;
...
And feel free to improve the PR!
@jcarvalho-ptech Thanks for the example.
Hey @jcarvalho-ptech Thanks for this PR. Feature definitely sounds interesting.
I'll test it with couple of different clients and I'll update the PR.