38 references to new
Diagnostics.FunctionalTests (5)
DeveloperExceptionPageSampleTest.cs (1)
42request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
ProblemDetailsExceptionHandlerSampleTest.cs (2)
27request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 44request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
StatusCodeSampleTest.cs (2)
61request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/plain")); 82request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
219requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
297request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json)); 357httpMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
Microsoft.AspNetCore.Diagnostics.Tests (6)
DeveloperExceptionPageMiddlewareTest.cs (5)
63request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 116request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 175request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 254client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html")); 329client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html"));
ExceptionHandlerMiddlewareTest.cs (1)
69request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (1)
479request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\LongPollingTransport.cs (2)
55request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*")); 155request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\SendUtils.cs (1)
44request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\ServerSentEventsTransport.cs (1)
56request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/event-stream"));
Microsoft.AspNetCore.Mvc.FunctionalTests (9)
ContentNegotiationTest.cs (3)
129request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 154request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml")); 347request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
ErrorPageTests.cs (2)
36Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html")); 56client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html"));
SerializableErrorTests.cs (2)
51request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptHeader)); 76request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptHeader));
XmlDataContractSerializerInputFormatterTest.cs (2)
60request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs")); 88request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs"));
Microsoft.AspNetCore.SignalR.Client.Tests (6)
HttpConnectionTests.cs (1)
174var headerFound = request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) == true;
LongPollingTransportTests.cs (1)
709if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) != true)
SendUtilsTests.cs (1)
24if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) == true)
ServerSentEventsTransportTests.cs (3)
180if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true) 309if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true) 417if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true)
Microsoft.DotNet.Internal.SymbolHelper (2)
SymbolPromotionHelper.cs (1)
205Accept = { new("application/json") }
SymbolUploadHelperFactory.cs (1)
150using HttpRequestMessage getToolRequest = new(HttpMethod.Get, downloadUri) { Headers = { Accept = { new ("application/zip") } } };
SocialSample (2)
Startup.cs (2)
139request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 200request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));