sdk-for-flutter
sdk-for-flutter copied to clipboard
🚀 Feature: Support for custom httpClient
🔖 Feature description
While creating instance of appwrite.client, there should be option to pass custom http.client for all(or possible) requests. This gives flexibility to use better implementations like retryClient, fetch_client, cronet_http etc. It helps app to use native implementations or http/2 and other features transparently.
🎤 Pitch
Reasons:
- we can easily use retryClient for our app provided by http package itself.
- we can experiement with platform native http implementations like cronet_http Interesting comparision about httpclients
- It is standard guidance from http package as below
This is standard guidance for package creators from http package page in Tip:
If you are writing a Dart package or Flutter plugin that uses package:http, you should not depend on a particular Client implementation. Let the application author decide what implementation is best for their project. You can make that easier by accepting an explicit Client argument
👀 Have you spent some time to check if this issue has been raised before?
- [x] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [x] I have read the Code of Conduct
@gandhimaulik Thank you for raising this issue. We've seen similar requests in the past, including in the Node.js repository (https://github.com/appwrite/sdk-for-web/issues/112). This is definitely on our radar. We've documented your request and will discuss it internally with the team to evaluate potential solutions and timeline. We appreciate your feedback and will keep you updated on any progress.