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

Header collection post without body bug #1131

Conversation

james-s-tayler
Copy link
Contributor

@james-s-tayler james-s-tayler commented Mar 20, 2021

What kind of change does this PR introduce?
This is a bug fix for HeaderCollection and Property not working correctly on Put Post and Patch when no [Body] attribute is present.

What is the current behavior?
The original bug was filed here #1102 - essentially when no [Body] attribute is present Refit tries to infer a body using a parameter with a value type that is not of type string and is not marked with a [Query] attribute. The bug was caused by not adding [HeaderCollection] and [Property] attributes to that list in the original PR and not having sufficient test coverage for those Put/Post/Patch.

What is the new behavior?
The [HeaderCollection] and [Property] attributes behave correctly on Put Post and Patch requests when no [Body] attribute is present.

What might this PR break?
Nothing. I've updated the test coverage of these features significantly with respect to put/post/patch to make sure.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants