Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #630: Unable to override Content-Type header charset #794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WannaCry016
Copy link
Contributor

PR Description

To improve request handling, I tried to replace the http package with dio, which provides greater control, better error handling, and enhanced support for advanced features like request cancellation and multipart form data. And it was working well as intented to prevent the Content-type to be overriden.

Why Dio?

Dio provides:

  • More control over request options and headers
  • Built-in support for interceptors, timeouts, and cancellation tokens
  • Simplified handling of form data and file uploads
  • Improved error reporting

Screenshot 2025-04-07 211455
Screenshot 2025-04-07 211519

Related Issues

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

  • Yes
  • No, and this is why: already have tests

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@WannaCry016
Copy link
Contributor Author

Hey @animator can u review it is this fine.

@animator
Copy link
Member

animator commented Apr 8, 2025

dio migration will take some time to review as it is a major change.
Can you figure something out using http package and make a separate PR?

@WannaCry016
Copy link
Contributor Author

ok i will try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to override Content-Type header
2 participants