1 type derived from StringContent
Microsoft.Extensions.Http.Polly.Tests (1)
292 instantiations of StringContent
Aspire.Hosting.PostgreSQL.Tests (1)
Binding.Http.IntegrationTests (1)
HttpStress (3)
IIS.FunctionalTests (19)
IISExpress.FunctionalTests (21)
Interop.FunctionalTests (2)
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore.Authentication.Test (22)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Microsoft.AspNetCore.HeaderPropagation.Tests (3)
Microsoft.AspNetCore.Http.Extensions.Tests (32)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (17)
25var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
60var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
95var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
133var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
169var fileContent1 = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
170var fileContent2 = new StringContent("there", Encoding.UTF8, "application/octet-stream");
212var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
249var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
285var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
358var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
392var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
441var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
481var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
520multipartFormData.Add(new StringContent("hello"), "message");
521multipartFormData.Add(new StringContent("foo"), "name");
818var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
821form.Add(new StringContent("foo"), "name");
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (12)
57content.Add(new StringContent("1"), "Id");
58content.Add(new StringContent("Write tests"), "Name");
59content.Add(new StringContent("true"), "IsComplete");
126content.Add(new StringContent("true"), "[foo]");
127content.Add(new StringContent("false"), "[bar]");
128content.Add(new StringContent("true"), "[baz]");
163content.Add(new StringContent("not-a-bool"), "[foo]");
164content.Add(new StringContent("1"), "[bar]");
165content.Add(new StringContent("2"), "[baz]");
235content.Add(new StringContent("1"), "[0]");
236content.Add(new StringContent("3"), "[1]");
237content.Add(new StringContent("5"), "[2]");
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (77)
ConsumesAttributeTestsBase.cs (5)
102request.Content = new StringContent(input, Encoding.UTF8, requestContentType);
123request.Content = new StringContent(input, Encoding.UTF8, requestContentType);
147request.Content = new StringContent(input, Encoding.UTF8, "application/xml");
168request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+json");
191request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+xml");
FormFileUploadTest.cs (10)
35content.Add(new StringContent("John"), "Name");
36content.Add(new StringContent("23"), "Age");
37content.Add(new StringContent("John's biography content"), "Biography", "Bio.txt");
59content.Add(new StringContent("Phone"), "Name");
60content.Add(new StringContent("camera"), "Specs[0].Key");
61content.Add(new StringContent("camera spec1 file contents"), "Specs[0].Value", "camera_spec1.txt");
62content.Add(new StringContent("camera spec2 file contents"), "Specs[0].Value", "camera_spec2.txt");
63content.Add(new StringContent("battery"), "Specs[1].Key");
64content.Add(new StringContent("battery spec1 file contents"), "Specs[1].Value", "battery_spec1.txt");
65content.Add(new StringContent("battery spec2 file contents"), "Specs[1].Value", "battery_spec2.txt");
InputObjectValidationTests.cs (12)
75var content = new StringContent(input, Encoding.UTF8, "application/xml");
97var content = new StringContent(input, Encoding.UTF8, "application/json");
118var content = new StringContent("{\"Alias\":\"xyz\"}", Encoding.UTF8, "application/json");
134var content = new StringContent(requestData, Encoding.UTF8, "application/json");
164var content = new StringContent(requestContent, Encoding.UTF8, "application/json");
204var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
225var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
245var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
270Content = new StringContent(@"{ ""Id"": ""S-1-5-21-1004336348-1177238915-682003330-512"" }", Encoding.UTF8, "application/json"),
291Content = new StringContent(input, Encoding.UTF8, "application/json"),
320Content = new StringContent(input, Encoding.UTF8, "application/json"),
352Content = new StringContent(input, Encoding.UTF8, "application/xml"),
JsonInputFormatterTestBase.cs (6)
47var content = new StringContent(input, Encoding.UTF8, requestContentType);
66var content = new StringContent(jsonInput, Encoding.UTF8, requestContentType);
84var content = new StringContent(input, Encoding.UTF8, "application/json");
100var content = new StringContent(expected, Encoding.UTF8, "application/json");
203var content = new StringContent(jsonInput, Encoding.UTF8, "application/json");
222var content = new StringContent(jsonInput, Encoding.UTF8, requestContentType);
Microsoft.AspNetCore.OutputCaching.Tests (2)
Microsoft.AspNetCore.ResponseCaching.Tests (2)
Microsoft.AspNetCore.Routing.FunctionalTests (3)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Microsoft.AspNetCore.SignalR.Client.Tests (4)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.TestHost.Tests (4)
Microsoft.Build.Tasks.UnitTests (7)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Helix.Sdk.Tests (8)
Microsoft.DotNet.Internal.SymbolHelper (2)
Microsoft.DotNet.VersionTools (11)
Microsoft.Extensions.Http.Diagnostics.Tests (44)
Logging\HttpClientLoggerTest.cs (17)
87Content = new StringContent(input, Encoding.UTF8, TextPlain)
125Content = new StringContent(input, Encoding.UTF8, TextPlain)
187Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
196Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
283Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
290Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
388Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
396Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
484Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
492Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
599Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
606Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
691Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
734Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
772Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
816Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
961Content = new StringContent("request_content", Encoding.UTF8, TextPlain)
Logging\HttpRequestBodyReaderTest.cs (6)
41Content = new StringContent(input, Encoding.UTF8, "text/plain"),
85Content = new StringContent(input, Encoding.UTF8, contentType),
106Content = new StringContent(input, Encoding.UTF8, "text/plain"),
134Content = new StringContent(input, Encoding.UTF8, "text/plain"),
158Content = new StringContent(input, Encoding.UTF8, "text/plain"),
232Content = new StringContent("content", Encoding.UTF8, "text/plain"),
Logging\HttpRequestReaderTest.cs (15)
84Content = new StringContent(requestContent, Encoding.UTF8)
93Content = new StringContent(responseContent, Encoding.UTF8)
147Content = new StringContent(requestContent, Encoding.UTF8)
153Content = new StringContent(responseContent, Encoding.UTF8)
210Content = new StringContent(requestContent, Encoding.UTF8),
222Content = new StringContent(responseContent, Encoding.UTF8)
285Content = new StringContent(requestContent, Encoding.UTF8),
297Content = new StringContent(responseContent, Encoding.UTF8)
357Content = new StringContent(requestContent, Encoding.UTF8),
415Content = new StringContent(requestContent, Encoding.UTF8),
427Content = new StringContent(responseContent, Encoding.UTF8)
486Content = new StringContent(requestContent, Encoding.UTF8),
494Content = new StringContent(responseContent, Encoding.UTF8)
553Content = new StringContent(requestContent, Encoding.UTF8),
562Content = new StringContent(responseContent, Encoding.UTF8)
Microsoft.Extensions.Http.Resilience.Tests (1)
89 references to StringContent
IIS.FunctionalTests (5)
IISExpress.FunctionalTests (5)
Interop.FunctionalTests (1)
Microsoft.AspNetCore.Authentication.Test (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (14)
25var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
60var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
95var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
133var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
169var fileContent1 = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
170var fileContent2 = new StringContent("there", Encoding.UTF8, "application/octet-stream");
212var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
249var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
285var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
358var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
392var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
441var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
481var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
818var fileContent = new StringContent("hello", Encoding.UTF8, "application/octet-stream");
Microsoft.AspNetCore.Mvc.FunctionalTests (27)
InputObjectValidationTests.cs (8)
75var content = new StringContent(input, Encoding.UTF8, "application/xml");
97var content = new StringContent(input, Encoding.UTF8, "application/json");
118var content = new StringContent("{\"Alias\":\"xyz\"}", Encoding.UTF8, "application/json");
134var content = new StringContent(requestData, Encoding.UTF8, "application/json");
164var content = new StringContent(requestContent, Encoding.UTF8, "application/json");
204var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
225var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
245var content = new StringContent(invalidRequestData, Encoding.UTF8, "application/json");
JsonInputFormatterTestBase.cs (6)
47var content = new StringContent(input, Encoding.UTF8, requestContentType);
66var content = new StringContent(jsonInput, Encoding.UTF8, requestContentType);
84var content = new StringContent(input, Encoding.UTF8, "application/json");
100var content = new StringContent(expected, Encoding.UTF8, "application/json");
203var content = new StringContent(jsonInput, Encoding.UTF8, "application/json");
222var content = new StringContent(jsonInput, Encoding.UTF8, requestContentType);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.TestHost.Tests (2)
Microsoft.DotNet.VersionTools (9)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
netstandard (1)
System.Net.Http (15)