diff --git a/src/libraries/System.Net.Http/ref/System.Net.Http.cs b/src/libraries/System.Net.Http/ref/System.Net.Http.cs index 875a471418940..3cb29a543b077 100644 --- a/src/libraries/System.Net.Http/ref/System.Net.Http.cs +++ b/src/libraries/System.Net.Http/ref/System.Net.Http.cs @@ -37,7 +37,12 @@ protected override void Dispose(bool disposing) { } } public partial class FormUrlEncodedContent : System.Net.Http.ByteArrayContent { - public FormUrlEncodedContent(System.Collections.Generic.IEnumerable> nameValueCollection) : base (default(byte[])) { } + public FormUrlEncodedContent( + System.Collections.Generic.IEnumerable> 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(string headerName, TContext context); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/FormUrlEncodedContent.cs b/src/libraries/System.Net.Http/src/System/Net/Http/FormUrlEncodedContent.cs index fe723de2c3330..abf61ca7ee051 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/FormUrlEncodedContent.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/FormUrlEncodedContent.cs @@ -12,7 +12,12 @@ namespace System.Net.Http { public class FormUrlEncodedContent : ByteArrayContent { - public FormUrlEncodedContent(IEnumerable> nameValueCollection) + public FormUrlEncodedContent( + IEnumerable> nameValueCollection) : base(GetContentByteArray(nameValueCollection)) { Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");