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

Removed nullability checks from FormUrlEncodedContent ctor #55410

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/libraries/System.Net.Http/ref/System.Net.Http.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ protected override void Dispose(bool disposing) { }
}
public partial class FormUrlEncodedContent : System.Net.Http.ByteArrayContent
{
public FormUrlEncodedContent(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string?, string?>> nameValueCollection) : base (default(byte[])) { }
public FormUrlEncodedContent(
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<
#nullable disable
string, string
#nullable restore
>> nameValueCollection) : base (default(byte[])) { }
protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext? context, System.Threading.CancellationToken cancellationToken) { throw null; }
}
public delegate System.Text.Encoding? HeaderEncodingSelector<TContext>(string headerName, TContext context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ namespace System.Net.Http
{
public class FormUrlEncodedContent : ByteArrayContent
{
public FormUrlEncodedContent(IEnumerable<KeyValuePair<string?, string?>> nameValueCollection)
public FormUrlEncodedContent(
IEnumerable<KeyValuePair<
#nullable disable
string, string
#nullable restore
>> nameValueCollection)
: base(GetContentByteArray(nameValueCollection))
{
Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
Expand Down