Skip to content

Conversation

@MihaZupan
Copy link
Member

Closes #83423

This PR doesn't change the behavior of MediaTypeHeaderValue? mediaType overloads where null currently means "no media type".
If we decide that's something we want to do, we can do so as a follow-up.

We have existing tests covering passing null to these consturctors.

@MihaZupan MihaZupan added this to the 9.0.0 milestone Jun 13, 2024
@MihaZupan MihaZupan requested a review from a team June 13, 2024 19:44
@MihaZupan MihaZupan self-assigned this Jun 13, 2024
@ghost
Copy link

ghost commented Jun 13, 2024

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

1 similar comment
@ghost
Copy link

ghost commented Jun 13, 2024

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

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

lgtm

@campersau
Copy link
Contributor

The ! could now be removed from here right?

var content = new StringContent(sourceString, defaultStringEncoding, ((Headers.MediaTypeHeaderValue)null)!);

@MihaZupan MihaZupan force-pushed the http-stringcontent-null branch from 5aae602 to 8962b4b Compare June 13, 2024 23:15
@MihaZupan MihaZupan merged commit 4a87c0e into dotnet:main Jun 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revert unintentional nullability changes and fix inconsistencies in StringContent ctrs

4 participants