appwrite / appwrite/sdk-for-flutter
🚀 Feature: Support for custom httpClient
- Dominant language
- Dart
- Stars
- 418
- Forks
- 150
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 3
Description
### 🔖 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:
1. we can easily use retryClient for our app provided by http package itself.
2. we can experiement with platform native http implementations like cronet_http [Interesting comparision about httpclients](https://blog.burkharts.net/everything-you-always-wanted-to-know-about-httpclients)
3. It is standard guidance from http package as below
This is standard guidance for package creators from http package page in [Tip](https://pub.dev/packages/http?source=post_page-----690521a27f6f---------------------------------------#choosing-an-implementation):
> If you are writing a Dart package or Flutter plugin that uses package:http, you should not depend on a particular [Client](https://pub.dev/documentation/http/latest/http/Client-class.html) implementation. Let the application author decide what implementation is best for their project. You can make that easier by accepting an explicit [Client](https://pub.dev/documentation/http/latest/http/Client-class.html) 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](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.