Implemented interface member:
123 references to Add
Aspire.Dashboard.Tests (2)
Integration\ResponseCompressionTests.cs (2)
27request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("br")); 49request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("br"));
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)
1132_httpRequestMessage.Headers.UserAgent.Add(ProductInfoHeaderValue.Parse(value));
IIS.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
136client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip")); 137client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("identity", 0));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
129request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip")); 147request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip"));
IISExpress.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
136client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip")); 137client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("identity", 0));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
129request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip")); 147request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip"));
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 (43)
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")); 348request.Headers.AcceptCharset.Add(new StringWithQualityHeaderValue("utf-8")); 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"));
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.OutputCaching.Tests (6)
OutputCacheTests.cs (6)
173client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("no-cache")); 760client.DefaultRequestHeaders.IfNoneMatch.Add(new System.Net.Http.Headers.EntityTagHeaderValue("\"E1\"")); 783client.DefaultRequestHeaders.IfNoneMatch.Add(new System.Net.Http.Headers.EntityTagHeaderValue("\"E2\"")); 901client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 906client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 911client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From"));
Microsoft.AspNetCore.ResponseCaching.Tests (9)
ResponseCachingTests.cs (9)
185client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("no-cache")); 711client.DefaultRequestHeaders.IfNoneMatch.Add(new System.Net.Http.Headers.EntityTagHeaderValue("\"E1\"")); 736client.DefaultRequestHeaders.IfNoneMatch.Add(new System.Net.Http.Headers.EntityTagHeaderValue("\"E2\"")); 861client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 866client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("Max-Forwards")); 871client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 896client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 901client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From")); 906client.DefaultRequestHeaders.Pragma.Add(new System.Net.Http.Headers.NameValueHeaderValue("From"));
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1281request.Headers.AcceptEncoding.Add(System.Net.Http.Headers.StringWithQualityHeaderValue.Parse(requestAcceptEncodings[i]));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
OpaqueUpgradeTests.cs (1)
298request.Headers.Connection.Add("upgrade");
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
102httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*", 0.1));
Microsoft.AspNetCore.StaticAssets.Tests (4)
StaticAssetsIntegrationTests.cs (4)
439message.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip")); 830req2.Headers.IfNoneMatch.Add(new EntityTagHeaderValue("\"fake\"")); 835req3.Headers.IfNoneMatch.Add(resp1.Headers.ETag); 840req4.Headers.IfNoneMatch.Add(new EntityTagHeaderValue("\"fake\""));
Microsoft.AspNetCore.WebSockets.Tests (11)
WebSocketCompressionMiddlewareTests.cs (3)
171request.Headers.Connection.Add("Upgrade"); 172request.Headers.Connection.Add("keep-alive"); 173request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
WebSocketMiddlewareTests.cs (8)
678request.Headers.Connection.Add("Upgrade"); 679request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket")); 761request.Headers.Connection.Add("Upgrade"); 762request.Headers.Connection.Add("keep-alive"); 763request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket")); 764request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("example")); 834request.Headers.Connection.Add("Upgrade"); 835request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (2)
609httpResponseMessage.Headers.TransferEncoding.Add(new("compress")); 879httpResponseMessage.Headers.TransferEncoding.Add(new("chunked"));
SocialSample (2)
Startup.cs (2)
139request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 200request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
185client.DefaultRequestHeaders.Connection.Add("close");
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (3)
56request.Headers.AcceptEncoding.Add(s_gzipHeaderValue); 61request.Headers.AcceptEncoding.Add(s_deflateHeaderValue); 66request.Headers.AcceptEncoding.Add(s_brotliHeaderValue);
System.Net.Requests (6)
System\Net\HttpWebRequest.cs (6)
1218_sendRequestMessage.Headers.Connection.Add(HttpKnownHeaderNames.KeepAlive); 1304pragmaHeaders.Add(new NameValueHeaderValue("no-cache")); 1311pragmaHeaders.Add(new NameValueHeaderValue("no-cache")); 1346pragmaHeaders.Add(new NameValueHeaderValue("no-cache")); 1360pragmaHeaders.Add(new NameValueHeaderValue("no-cache")); 1367pragmaHeaders.Add(new NameValueHeaderValue("no-cache"));
Templates.Blazor.Tests (3)
BlazorWebTemplateTest.cs (3)
88request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("gzip")); 89request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("deflate")); 90request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("br"));