Skip to content

Commit

Permalink
Removed nullability checks from FormUrlEncodedContent ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP committed Jul 9, 2021
1 parent 7b0cdaf commit 8321bc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit 8321bc5

Please sign in to comment.