90 references to StringContent
Microsoft.AspNetCore.Authentication.Test (16)
FacebookTests.cs (1)
482
res.Content = new
StringContent
(text, Encoding.UTF8, "application/json");
GoogleTests.cs (1)
1126
res.Content = new
StringContent
(text, Encoding.UTF8, "application/json");
MicrosoftAccountTests.cs (1)
429
res.Content = new
StringContent
(text, Encoding.UTF8, "application/json");
OAuthTests.cs (1)
537
res.Content = new
StringContent
(text, Encoding.UTF8, "application/json");
OpenIdConnect\OpenIdConnectEventTests.cs (3)
1314
new
StringContent
(form, Encoding.ASCII, "application/x-www-form-urlencoded"));
1398
new
StringContent
("{ \"id_token\": \"my_id_token\", \"access_token\": \"my_access_token\" }", Encoding.ASCII, "application/json")
1403
return Task.FromResult(new HttpResponseMessage() { Content = new
StringContent
("{ }", Encoding.ASCII, "application/json") });
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (3)
1312
new
StringContent
(form, Encoding.ASCII, "application/x-www-form-urlencoded"));
1393
new
StringContent
("{ \"id_token\": \"my_id_token\", \"access_token\": \"my_access_token\" }", Encoding.ASCII, "application/json")
1398
return Task.FromResult(new HttpResponseMessage() { Content = new
StringContent
("{ }", Encoding.ASCII, "application/json") });
OpenIdConnect\TestSettings.cs (1)
335
var content = new
StringContent
(body, Encoding.UTF8, "application/json");
TwitterTests.cs (3)
599
new
StringContent
("oauth_callback_confirmed=true&oauth_token=test_oauth_token&oauth_token_secret=test_oauth_token_secret",
614
new
StringContent
("{\"errors\":[{\"code\":32,\"message\":\"Could not authenticate you.\"}]}",
629
new
StringContent
("example response text",
WsFederation\WsFederationTest.cs (1)
453
var newResponse = new HttpResponseMessage() { Content = new
StringContent
(metadata, Encoding.UTF8, "text/xml") };
WsFederation\WsFederationTest_Handler.cs (1)
449
var newResponse = new HttpResponseMessage() { Content = new
StringContent
(metadata, Encoding.UTF8, "text/xml") };
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (1)
225
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (14)
25
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
60
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
95
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
133
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
169
var fileContent1 = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
170
var fileContent2 = new
StringContent
("there", Encoding.UTF8, "application/octet-stream");
212
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
249
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
285
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
358
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
392
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
441
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
481
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
818
var fileContent = new
StringContent
("hello", Encoding.UTF8, "application/octet-stream");
Microsoft.AspNetCore.Mvc.FunctionalTests (49)
ApiBehaviorTest.cs (2)
105
Content = new
StringContent
("some content", Encoding.UTF8, "text/css"),
121
Content = new
StringContent
("some content", Encoding.Latin1, "application/json"),
ConsumesAttributeTestsBase.cs (5)
102
request.Content = new
StringContent
(input, Encoding.UTF8, requestContentType);
123
request.Content = new
StringContent
(input, Encoding.UTF8, requestContentType);
147
request.Content = new
StringContent
(input, Encoding.UTF8, "application/xml");
168
request.Content = new
StringContent
(input, Encoding.UTF8, "application/vnd.example+json");
191
request.Content = new
StringContent
(input, Encoding.UTF8, "application/vnd.example+xml");
ContentNegotiationTest.cs (1)
403
var content = new
StringContent
("1234", Encoding.UTF8, "application/custom");
DoNotRespectBrowserAcceptHeaderTests.cs (2)
100
request.Content = new
StringContent
(requestData, Encoding.UTF8, "application/xml");
131
request.Content = new
StringContent
(requestData, Encoding.UTF8, "application/xml");
FiltersTest.cs (1)
89
Content = new
StringContent
("Test", Encoding.UTF8, "application/json"),
HtmlGenerationTest.cs (1)
618
requestMessage.Content = new
StringContent
(content, Encoding.UTF8, "application/json");
InputFormatterTests.cs (3)
45
var content = new
StringContent
(input, Encoding.UTF8, "application/xml");
61
var content = new
StringContent
("Test Content", Encoding.GetEncoding(encoding), "text/plain");
78
var content = new
StringContent
("Test Content", Encoding.UTF8, contentType);
InputObjectValidationTests.cs (12)
75
var content = new
StringContent
(input, Encoding.UTF8, "application/xml");
97
var content = new
StringContent
(input, Encoding.UTF8, "application/json");
118
var content = new
StringContent
("{\"Alias\":\"xyz\"}", Encoding.UTF8, "application/json");
134
var content = new
StringContent
(requestData, Encoding.UTF8, "application/json");
164
var content = new
StringContent
(requestContent, Encoding.UTF8, "application/json");
204
var content = new
StringContent
(invalidRequestData, Encoding.UTF8, "application/json");
225
var content = new
StringContent
(invalidRequestData, Encoding.UTF8, "application/json");
245
var content = new
StringContent
(invalidRequestData, Encoding.UTF8, "application/json");
270
Content = new
StringContent
(@"{ ""Id"": ""S-1-5-21-1004336348-1177238915-682003330-512"" }", Encoding.UTF8, "application/json"),
291
Content = new
StringContent
(input, Encoding.UTF8, "application/json"),
320
Content = new
StringContent
(input, Encoding.UTF8, "application/json"),
352
Content = new
StringContent
(input, Encoding.UTF8, "application/xml"),
InputParentValidationTests.cs (1)
88
return new
StringContent
(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");
JsonInputFormatterTestBase.cs (6)
47
var content = new
StringContent
(input, Encoding.UTF8, requestContentType);
66
var content = new
StringContent
(jsonInput, Encoding.UTF8, requestContentType);
84
var content = new
StringContent
(input, Encoding.UTF8, "application/json");
100
var content = new
StringContent
(expected, Encoding.UTF8, "application/json");
203
var content = new
StringContent
(jsonInput, Encoding.UTF8, "application/json");
222
var content = new
StringContent
(jsonInput, Encoding.UTF8, requestContentType);
JsonOutputFormatterTestBase.cs (1)
53
request.Content = new
StringContent
(input, Encoding.UTF8, "application/xml");
JsonPatchInputFormatterTest.cs (1)
167
Content = new
StringContent
(body, Encoding.UTF8, "application/json-patch+json"),
NewtonsoftJsonInputFormatterTest.cs (3)
16
var content = new
StringContent
("{", Encoding.UTF8, "application/json");
35
var content = new
StringContent
(jsonInput, Encoding.UTF8, requestContentType);
52
var content = new
StringContent
(jsonInput, Encoding.UTF8, requestContentType);
RequestSizeLimitTest.cs (1)
83
request.Content = new
StringContent
(expected, Encoding.UTF8, "text/json");
RoutingFallbackTest.cs (1)
138
Content = new
StringContent
("some plaintext", Encoding.UTF8, "text/plain"),
SerializableErrorTests.cs (3)
74
Content = new
StringContent
(expectedXml, Encoding.UTF8, acceptHeader)
122
request.Content = new
StringContent
(inputXml, Encoding.UTF8, acceptHeader);
163
request.Content = new
StringContent
(inputXml, Encoding.UTF8, acceptHeader);
XmlDataContractSerializerInputFormatterTest.cs (3)
40
var content = new
StringContent
(input, Encoding.UTF8, "application/xml-dcs");
59
request.Content = new
StringContent
(input, Encoding.UTF8, "application/xml-dcs");
87
request.Content = new
StringContent
(input, Encoding.UTF8, "application/xml-dcs");
XmlSerializerInputFormatterTests.cs (2)
41
var content = new
StringContent
(input, Encoding.UTF8, "application/xml-xmlser");
58
var content = new
StringContent
(input, Encoding.UTF8, "application/xml-xmlser");
Microsoft.DotNet.Build.Tasks.Feed (1)
src\CreateAzureDevOpsFeed.cs (1)
149
createFeedMessage.Content = new
StringContent
(createBody, Encoding.UTF8, "application/json");
Microsoft.DotNet.Deployment.Tasks.Links (1)
src\AkaMSLinksManager.cs (1)
276
requestMessage.Content = new
StringContent
(newOrUpdatedLinksJson, Encoding.UTF8, "application/json");
Microsoft.DotNet.Helix.Sdk (3)
CreateFailedTestsForFailedWorkItems.cs (1)
43
Content = new
StringContent
(
StartAzurePipelinesTestRun.cs (1)
38
Content = new
StringContent
(
StopAzurePipelinesTestRun.cs (1)
33
Content = new
StringContent
(
Microsoft.DotNet.VersionTools (3)
Automation\VstsApi\VstsAdapterClient.cs (3)
134
var bodyContent = new
StringContent
(createPrBody, Encoding.UTF8, "application/json");
171
Content = new
StringContent
(
270
var bodyContent = new
StringContent
(body, Encoding.UTF8, "application/json");
System.Net.Http (2)
System\Net\Http\StringContent.cs (2)
23
:
this
(content, DefaultStringEncoding, DefaultMediaType)
40
:
this
(content, encoding, DefaultMediaType)