2 writes to Accept
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") } } };
76 references to Accept
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"));
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1062_httpRequestMessage.Headers.Accept.TryParseAdd(value);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
219requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterPostConfigureOptions.cs (1)
51options.Backchannel.DefaultRequestHeaders.Accept.ParseAdd("*/*");
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 (45)
ContentNegotiationTest.cs (8)
129request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 154request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml")); 347request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml")); 368request.Headers.Accept.ParseAdd(acceptMediaType); 386request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json")); 405request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/custom1")); 421request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/custom1")); 436request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
ErrorPageTests.cs (2)
36Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html")); 56client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html"));
JsonOutputFormatterTestBase.cs (1)
52request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
RespectBrowserAcceptHeaderTests.cs (2)
44request.Headers.Accept.ParseAdd("text/html, application/json, image/jpeg, */*; q=.2"); 63request.Headers.Accept.ParseAdd("text/plain; charset=utf-8");
SerializableErrorTests.cs (4)
51request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptHeader)); 76request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptHeader)); 121request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(acceptHeader)); 162request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(acceptHeader));
XmlDataContractSerializerFormattersWrappingTest.cs (8)
45request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 69request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 93request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 116request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 139request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 164request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 187request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs")); 208request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
XmlDataContractSerializerInputFormatterTest.cs (2)
60request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs")); 88request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs"));
XmlOutputFormatterTests.cs (10)
43request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 65request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 88request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 109request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 132request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 153request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 171request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 191request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 211request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml")); 232request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
XmlSerializerFormattersWrappingTest.cs (8)
44request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 65request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 86request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 106request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 126request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 148request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 168request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser")); 186request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
Microsoft.AspNetCore.SignalR.Client.Tests (7)
HttpConnectionTests.cs (1)
174var headerFound = request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) == true;
LongPollingTransportTests.cs (1)
709if (request.Headers.Accept?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) != true)
ResponseUtils.cs (1)
55return request.Method == HttpMethod.Get && request.Headers.Accept.Any(h => h.MediaType == "text/event-stream");
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.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
102httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*", 0.1));
SocialSample (2)
Startup.cs (2)
139request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 200request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));