Skip to content

Conversation

@connectwithpankaj
Copy link

@connectwithpankaj connectwithpankaj commented Mar 15, 2025

PR Description

Fixed Content-Type Header Handling:

Previously, Content-Type was only set if requestModel.hasContentTypeHeader was false.
Now, it explicitly checks if requestModel.bodyContentType.header.isNotEmpty before setting the header.
Improved Multipart Request Handling:

Previously, only text fields and files were handled.
Now, it ensures proper header management and optimizes file uploads.
Better Header Management:

Ensures Content-Length is dynamically set when sending request bodies.
Enhanced Error Handling:

Improved exception handling for unexpected errors.
More robust cancellation detection (wasRequestCancelled).
GraphQL Request Handling Fix:

Ensures GraphQL requests always set Content-Type: application/json.
Performance Optimization:

Uses a Stopwatch to track execution time and ensure it stops properly.

Related Issues

  • Closes #

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: please replace this line with details on why tests have not been included

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@animator
Copy link
Member

This PR does not resolve the issue.

@animator animator closed this Mar 29, 2025
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.

2 participants