2 writes to Accept
Microsoft.DotNet.Internal.SymbolHelper (2)
SymbolPromotionHelper.cs (1)
205
Accept
= { new("application/json") }
SymbolUploadHelperFactory.cs (1)
150
using HttpRequestMessage getToolRequest = new(HttpMethod.Get, downloadUri) { Headers = {
Accept
= { new ("application/zip") } } };
76 references to Accept
Diagnostics.FunctionalTests (5)
DeveloperExceptionPageSampleTest.cs (1)
42
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
ProblemDetailsExceptionHandlerSampleTest.cs (2)
27
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
44
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
StatusCodeSampleTest.cs (2)
61
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/plain"));
82
request.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)
219
requestMessage.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterPostConfigureOptions.cs (1)
51
options.Backchannel.DefaultRequestHeaders.
Accept
.ParseAdd("*/*");
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
297
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
357
httpMessage.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
Microsoft.AspNetCore.Diagnostics.Tests (6)
DeveloperExceptionPageMiddlewareTest.cs (5)
63
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
116
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
175
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
254
client.DefaultRequestHeaders.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/html"));
329
client.DefaultRequestHeaders.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/html"));
ExceptionHandlerMiddlewareTest.cs (1)
69
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (1)
479
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\LongPollingTransport.cs (2)
55
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("*/*"));
155
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\SendUtils.cs (1)
44
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("*/*"));
Internal\ServerSentEventsTransport.cs (1)
56
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/event-stream"));
Microsoft.AspNetCore.Mvc.FunctionalTests (45)
ContentNegotiationTest.cs (8)
129
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
154
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
347
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
368
request.Headers.
Accept
.ParseAdd(acceptMediaType);
386
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
405
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/custom1"));
421
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/custom1"));
436
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
ErrorPageTests.cs (2)
36
Client.DefaultRequestHeaders.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/html"));
56
client.DefaultRequestHeaders.
Accept
.Add(new MediaTypeWithQualityHeaderValue("text/html"));
JsonOutputFormatterTestBase.cs (1)
52
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
RespectBrowserAcceptHeaderTests.cs (2)
44
request.Headers.
Accept
.ParseAdd("text/html, application/json, image/jpeg, */*; q=.2");
63
request.Headers.
Accept
.ParseAdd("text/plain; charset=utf-8");
SerializableErrorTests.cs (4)
51
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue(acceptHeader));
76
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue(acceptHeader));
121
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse(acceptHeader));
162
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse(acceptHeader));
XmlDataContractSerializerFormattersWrappingTest.cs (8)
45
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
69
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
93
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
116
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
139
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
164
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
187
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
208
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-dcs"));
XmlDataContractSerializerInputFormatterTest.cs (2)
60
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs"));
88
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/xml-dcs"));
XmlOutputFormatterTests.cs (10)
43
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
65
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
88
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
109
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
132
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
153
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
171
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
191
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
211
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
232
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml"));
XmlSerializerFormattersWrappingTest.cs (8)
44
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
65
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
86
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
106
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
126
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
148
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
168
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
186
request.Headers.
Accept
.Add(MediaTypeWithQualityHeaderValue.Parse("application/xml-xmlser"));
Microsoft.AspNetCore.SignalR.Client.Tests (7)
HttpConnectionTests.cs (1)
174
var headerFound = request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) == true;
LongPollingTransportTests.cs (1)
709
if (request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) != true)
ResponseUtils.cs (1)
55
return request.Method == HttpMethod.Get && request.Headers.
Accept
.Any(h => h.MediaType == "text/event-stream");
SendUtilsTests.cs (1)
24
if (request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("*/*")) == true)
ServerSentEventsTransportTests.cs (3)
180
if (request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true)
309
if (request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true)
417
if (request.Headers.
Accept
?.Contains(new MediaTypeWithQualityHeaderValue("text/event-stream")) == true)
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
102
httpClient.DefaultRequestHeaders.
Accept
.Add(new MediaTypeWithQualityHeaderValue("*/*", 0.1));
SocialSample (2)
Startup.cs (2)
139
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
200
request.Headers.
Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));