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

🐛 Only produce null response body when the response is a JSON type #1874

Merged
merged 8 commits into from
Jul 10, 2023

Conversation

AlexV525
Copy link
Member

Resolves #1834.

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

@AlexV525 AlexV525 requested a review from a team as a code owner June 17, 2023 06:00
},
onDone: () => completer.complete(),
cancelOnError: true,
);
options.cancelToken?.whenCancel.then((_) {
return subscription.cancel();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about how this line will behave (whether we should complete the completer or not). It's a void future and we await for the completer in the outside scope.

@AlexV525 AlexV525 changed the title 🐛 Only produce null response body when ResponseType.json 🐛 Only produce null response body when the response is a JSON type Jul 6, 2023
@AlexV525
Copy link
Member Author

AlexV525 commented Jul 7, 2023

cc @kuhnroyal @ueman

@AlexV525 AlexV525 merged commit c301ffe into main Jul 10, 2023
31 checks passed
@AlexV525 AlexV525 deleted the fix/null-response-body-only-when-response-type-json branch July 10, 2023 02:36
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.

Empty response body is read as null
3 participants