124 references to StringContent
Microsoft.AspNetCore.Authentication.Test (19)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
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 (49)
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");
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.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Internal.SymbolHelper (2)
Microsoft.DotNet.VersionTools (3)
Microsoft.Extensions.Http.Diagnostics.Tests (27)
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"),
Microsoft.Extensions.Http.Resilience.Tests (1)
System.Net.Http (2)