307 references to Add
Aspire.Hosting.PostgreSQL.Tests (1)
PostgresFunctionalTests.cs (1)
176client.DefaultRequestHeaders.Add("x-session-id", Guid.NewGuid().ToString());
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1163_httpRequestMessage.Headers.Add(name, value);
IIS.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
138client.DefaultRequestHeaders.Add("Response-Content-Type", "text/event-stream");
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (3)
145deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", newANCMPath); 166deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", originalANCMPath); 182deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", newANCMPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
49requestMessage.Headers.Add("foo", "£"); 67requestMessage.Headers.Add("foo", "£");
IISExpress.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
138client.DefaultRequestHeaders.Add("Response-Content-Type", "text/event-stream");
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (3)
145deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", newANCMPath); 166deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", originalANCMPath); 182deploymentResult.HttpClient.DefaultRequestHeaders.Add("ANCMRHPath", newANCMPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Latin1Tests.cs (2)
49requestMessage.Headers.Add("foo", "£"); 67requestMessage.Headers.Add("foo", "£");
Interop.FunctionalTests (6)
Http3\Http3RequestTests.cs (3)
912request1.Headers.Add("id", "1"); 925request2.Headers.Add("id", "2"); 941request3.Headers.Add("id", "3");
HttpClientHttp2InteropTests.cs (3)
1060request.Headers.Add("header" + i, oneKbString + i); 1169request.Headers.Add("header" + i, oneKbString + i); 1368request.Headers.Add("header" + i, oneKbString + i);
Microsoft.AspNetCore.Authentication.Test (16)
CertificateTests.cs (4)
395client.DefaultRequestHeaders.Add("X-Client-Cert", Convert.ToBase64String(Certificates.SelfSignedValidWithNoEku.RawData)); 412client.DefaultRequestHeaders.Add("X-Client-Cert", "OOPS" + Convert.ToBase64String(Certificates.SelfSignedValidWithNoEku.RawData)); 431client.DefaultRequestHeaders.Add("X-ARR-ClientCert", Convert.ToBase64String(Certificates.SelfSignedValidWithNoEku.RawData)); 449client.DefaultRequestHeaders.Add("random-Weird-header", Convert.ToBase64String(Certificates.SelfSignedValidWithNoEku.RawData));
CookieTests.cs (1)
1908request.Headers.Add("Cookie", cookieHeader);
JwtBearerTests.cs (1)
1253request.Headers.Add("Authorization", authorizationHeader);
JwtBearerTests_Handler.cs (1)
1312request.Headers.Add("Authorization", authorizationHeader);
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1312client.DefaultRequestHeaders.Add("Cookie", cookie);
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1310client.DefaultRequestHeaders.Add("Cookie", cookie);
OpenIdConnect\TestServerExtensions.cs (1)
26request.Headers.Add("Cookie", cookieHeader);
TestExtensions.cs (1)
23request.Headers.Add("Cookie", cookieHeader);
TwitterTests.cs (3)
219request.Headers.Add(HeaderNames.Cookie, cookie.ToString()); 269request.Headers.Add(HeaderNames.Cookie, cookie.ToString()); 376request.Headers.Add(HeaderNames.Cookie, cookie.ToString());
WsFederation\WsFederationTest.cs (1)
269request.Headers.Add(HeaderNames.Cookie, new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
WsFederation\WsFederationTest_Handler.cs (1)
267request.Headers.Add(HeaderNames.Cookie, new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterHandler.cs (2)
255request.Headers.Add("Authorization", stringBuilder.ToString()); 259request.Headers.Add("Accept", "application/json");
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
20request.Headers.Add("Cookie", cookieHeader);
Microsoft.AspNetCore.HeaderPropagation.Tests (5)
HeaderPropagationIntegrationTest.cs (4)
110request.Headers.Add("in", "test"); 136request.Headers.Add("first", "value"); 137request.Headers.Add("second", "other"); 183request.Headers.Add("in", "test");
HeaderPropagationMessageHandlerTest.cs (1)
198request.Headers.Add("inout", outgoingValue);
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (5)
654httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); 658httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); 663httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); 673httpClient.DefaultRequestHeaders.Add(Constants.UserAgent, Constants.UserAgentHeader); 678httpClient.DefaultRequestHeaders.Add("X-Requested-With", "XMLHttpRequest");
Microsoft.AspNetCore.HttpOverrides.Tests (1)
HttpMethodOverrideMiddlewareTest.cs (1)
40req.Headers.Add("X-Http-Method-Override", "DELETE");
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
223client.DefaultRequestHeaders.Add(HeaderNames.Cookie, cookie); 1481client.DefaultRequestHeaders.Add(HeaderNames.Cookie, cookie);
Microsoft.AspNetCore.Identity.InMemory.Test (2)
FunctionalTest.cs (2)
433request.Headers.Add("Cookie", cookieHeader); 437request.Headers.Add(HeaderNames.XRequestedWith, "XMLHttpRequest");
Microsoft.AspNetCore.Localization.FunctionalTests (2)
LocalizationSampleTest.cs (1)
34request.Headers.Add("Cookie", $"{CookieRequestCultureProvider.DefaultCookieName}={cookieValue}");
LocalizationTest.cs (1)
113request.Headers.Add("Cookie", $"{CookieRequestCultureProvider.DefaultCookieName}={cookieValue}");
Microsoft.AspNetCore.Localization.Tests (5)
CookieRequestCultureProviderTest.cs (4)
66client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", value).ToString()); 116client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", "uic=ar-SA").ToString()); 215client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={culture}|uic={uiCulture}").ToString()); 275client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={culture}|uic={uiCulture}").ToString());
RequestLocalizationMiddlewareTest.cs (1)
67client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue("Preferences", $"c={requestedCulture}|uic={requestedCulture}").ToString());
Microsoft.AspNetCore.Mvc.FunctionalTests (97)
AntiforgeryMiddlewareTest.cs (4)
41request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 125request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 157request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 189request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken);
AntiforgeryTests.cs (2)
68request.Headers.Add("Cookie", cookieToken.Key + "=" + cookieToken.Value); 118request.Headers.Add("Cookie", cookieToken.Key + "=" + cookieToken.Value);
ApplicationModelTest.cs (1)
127request.Headers.Add("helloWorld", "HelloWorld");
AsyncEnumerableTestBase.cs (1)
76request.Headers.Add("Accept", "application/xml");
AuthMiddlewareAndFilterTestBase.cs (11)
57request.Headers.Add("Cookie", authCookie); 75request.Headers.Add("Cookie", authCookie); 82request.Headers.Add("Cookie", authCookie); 121request.Headers.Add("Cookie", authCookie); 171request.Headers.Add("Cookie", cookie); 190request.Headers.Add("Cookie", cookie); 205request.Headers.Add("Cookie", cookie); 210request.Headers.Add("Cookie", cookie); 218request.Headers.Add("Cookie", cookie); 252request.Headers.Add("Cookie", authCookie); 259request.Headers.Add("Cookie", authCookie);
AuthMiddlewareUsingRequireAuthTest.cs (2)
48request.Headers.Add("Cookie", authCookie); 67request.Headers.Add("Cookie", authCookie);
ContentNegotiationTest.cs (2)
490request.Headers.Add("Accept", "application/vnd.example.contact+json; v=2"); 508request.Headers.Add("Accept", "application/vnd.example.contact+xml; v=2");
CorsTests.cs (2)
17request.Headers.Add(CorsConstants.Origin, "http://example.com"); 18request.Headers.Add(CorsConstants.AccessControlRequestMethod, "POST");
CorsTestsBase.cs (30)
45request.Headers.Add(CorsConstants.Origin, origin); 81request.Headers.Add(CorsConstants.Origin, "http://example.com"); 82request.Headers.Add(CorsConstants.AccessControlRequestMethod, "POST"); 99request.Headers.Add(CorsConstants.Origin, "http://example.com"); 100request.Headers.Add(CorsConstants.AccessControlRequestMethod, "POST"); 122request.Headers.Add(CorsConstants.Origin, "http://example.com"); 123request.Headers.Add(CorsConstants.AccessControlRequestMethod, method); 124request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom"); 159request.Headers.Add(CorsConstants.Origin, "http://example.com"); 160request.Headers.Add(CorsConstants.AccessControlExposeHeaders, "exposed1,exposed2"); 191request.Headers.Add(CorsConstants.Origin, "http://example.com"); 192request.Headers.Add(CorsConstants.AccessControlRequestMethod, "PUT"); 193request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "header1,header2"); 225request.Headers.Add(CorsConstants.Origin, "http://example2.com"); 250request.Headers.Add(CorsConstants.Origin, "http://example.com"); 276request.Headers.Add(CorsConstants.Origin, "http://example.com"); 277request.Headers.Add(CorsConstants.AccessControlRequestMethod, method); 278request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom"); 301request.Headers.Add(CorsConstants.Origin, "http://example.com"); 302request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET"); 303request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom"); 333request.Headers.Add(CorsConstants.Origin, "http://example.com"); 334request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET"); 335request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom"); 372request.Headers.Add(CorsConstants.Origin, "http://example.com"); 373request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET"); 374request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom"); 395request.Headers.Add(CorsConstants.Origin, "http://notexpecteddomain.com"); 396request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET"); 397request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
DoNotRespectBrowserAcceptHeaderTests.cs (1)
149request.Headers.Add("Accept", accept);
FiltersTest.cs (1)
20Client.DefaultRequestHeaders.Add("Authorization", "Bearer key");
GlobalAuthorizationFilterTestBase.cs (1)
73request.Headers.Add("Cookie", cookie2);
HtmlGenerationTest.cs (2)
505request.Headers.Add("Cookie", "CartId=10"); 807request.Headers.Add("Locale", locale);
NonNullableReferenceTypesTest.cs (2)
53request.Headers.Add("Cookie", cookieToken.Key + "=" + cookieToken.Value); 95request.Headers.Add("Cookie", cookieToken.Key + "=" + cookieToken.Value);
RazorPageModelTest.cs (2)
195request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 196request.Headers.Add("RequestVerificationToken", formToken);
RazorPagesTest.cs (18)
102postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 103postRequest.Headers.Add("RequestVerificationToken", formToken); 134postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 135postRequest.Headers.Add("RequestVerificationToken", formToken); 215postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 216postRequest.Headers.Add("RequestVerificationToken", formToken); 247postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 248postRequest.Headers.Add("RequestVerificationToken", formToken); 417postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 418postRequest.Headers.Add("RequestVerificationToken", formToken); 509request.Headers.Add("Cookie", GetCookie(response)); 534request.Headers.Add("Cookie", GetCookie(response)); 559request.Headers.Add("Cookie", GetCookie(response)); 581request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 582request.Headers.Add("RequestVerificationToken", formToken); 595request.Headers.Add("Cookie", GetCookie(response)); 1507request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 1508request.Headers.Add("RequestVerificationToken", formToken);
RazorPagesWithBasePathTest.cs (4)
711request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 712request.Headers.Add("RequestVerificationToken", antiforgeryToken); 762request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value); 763request.Headers.Add("RequestVerificationToken", formToken);
SimpleWithWebApplicationBuilderTests.cs (2)
269Client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(antiforgeryOptions.Value.Cookie.Name, tokens.CookieToken).ToString()); 270Client.DefaultRequestHeaders.Add(tokens.HeaderName, tokens.RequestToken);
TempDataInCookiesUsingCookieConsentTest.cs (1)
116request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
TempDataPropertyTest.cs (1)
169request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
TempDataTestBase.cs (1)
272request.Headers.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString());
TestingInfrastructureTests.cs (4)
60request.Headers.Add("X-Pass-Thru", "Some-Value"); 81request.Headers.Add("X-Pass-Thru", "Some-Value"); 237request.Headers.Add("Authorization", "Bearer key"); 276request.Headers.Add("X-Added-Header", "true");
ViewEngineTests.cs (2)
164request.Headers.Add("Cookie", 308request.Headers.Add("Cookie",
Microsoft.AspNetCore.Mvc.Testing (1)
Handlers\CookieContainerHandler.cs (1)
47request.Headers.Add(HeaderNames.Cookie, cookieHeader);
Microsoft.AspNetCore.Routing.FunctionalTests (7)
MinimalFormTests.cs (7)
54request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 114request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 475request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 534request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 586request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 638request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 687request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
Listener\ResponseHeaderTests.cs (1)
349request.Headers.Add("Connection", "Keep-Alive");
RequestHeaderTests.cs (1)
238client.DefaultRequestHeaders.Add(header.Key, header.Value);
Microsoft.AspNetCore.Session.Tests (5)
SessionTests.cs (5)
204client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 264client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 322client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 426client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(cookie.Name, cookie.Value).ToString()); 495client.DefaultRequestHeaders.Add(
Microsoft.AspNetCore.StaticAssets.Tests (10)
StaticAssetsIntegrationTests.cs (10)
652req.Headers.Add("If-Match", "\"fake\""); 665req.Headers.Add("If-Match", original.Headers.ETag.ToString()); 676req.Headers.Add("If-Match", "*"); 687req.Headers.Add("If-Match", "*"); 714req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString()); 727req2.Headers.Add("If-None-Match", "*"); 740req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString()); 787req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString()); 804req2.Headers.Add("If-Match", etag + ", " + etag); 811req3.Headers.Add("If-Match", etag + ", \"badetag\"");
Microsoft.AspNetCore.StaticFiles.Tests (37)
CacheHeaderTests.cs (7)
51req.Headers.Add("If-Match", "\"fake\""); 65req.Headers.Add("If-Match", original.Headers.ETag.ToString()); 77req.Headers.Add("If-Match", "*"); 89req.Headers.Add("If-Match", "*"); 117req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString()); 131req2.Headers.Add("If-None-Match", "*"); 145req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
RangeHeaderTests.cs (30)
24req.Headers.Add("If-Range", original.Headers.ETag.ToString()); 25req.Headers.Add("Range", "bytes=0-10"); 45req.Headers.Add("If-Range", original.Headers.ETag.ToString()); 46req.Headers.Add("Range", "bytes=0-10"); 66req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 67req.Headers.Add("Range", "bytes=0-10"); 83req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.AddHours(-1).ToString("r")); 84req.Headers.Add("Range", "bytes=0-10"); 100req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.ToString("r")); 101req.Headers.Add("Range", "bytes=0-10"); 117req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 118req.Headers.Add("Range", "bytes=0-10"); 136req.Headers.Add("If-Range", "\"OldEtag\""); 137req.Headers.Add("Range", "bytes=0-10"); 153req.Headers.Add("If-Range", "\"OldEtag\""); 154req.Headers.Add("Range", "bytes=0-10"); 172req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 173req.Headers.Add("Range", "bytes=0-10"); 191req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 192req.Headers.Add("Range", "bytes=0-10"); 211req.Headers.Add("If-Range", original.Headers.ETag.ToString()); 219req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 238req.Headers.Add("If-Range", original.Headers.ETag.ToString()); 246req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 271req.Headers.Add("Range", "bytes=" + range); 292req.Headers.Add("Range", "bytes=" + range); 313req.Headers.Add("Range", "bytes=" + range); 327req.Headers.Add("Range", "bytes=" + range); 423req.Headers.Add("Range", "bytes=" + ranges); 443req.Headers.Add("Range", "bytes=" + range);
Microsoft.AspNetCore.TestHost.Tests (1)
ClientHandlerTests.cs (1)
121httpClient.DefaultRequestHeaders.Add(HeaderNames.UserAgent, userAgent);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (1)
1454client.DefaultRequestHeaders.Add("x-forwarded-proto", "https");
WebHostTests.cs (1)
81client.DefaultRequestHeaders.Add("x-forwarded-proto", "https");
Microsoft.AspNetCore.WebSockets.Tests (13)
WebSocketCompressionMiddlewareTests.cs (5)
37request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate"); 65request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate"); 99request.Headers.Add(HeaderNames.SecWebSocketExtensions, clientHeader); 174request.Headers.Add(HeaderNames.SecWebSocketVersion, "13"); 176request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
WebSocketMiddlewareTests.cs (8)
680request.Headers.Add(HeaderNames.SecWebSocketVersion, "13"); 682request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None)); 684request.Headers.Add(HeaderNames.Origin, "http://example.com"); 710request.Headers.Add("Origin", "http://notexample.com"); 765request.Headers.Add(HeaderNames.SecWebSocketVersion, "13"); 767request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None)); 836request.Headers.Add(HeaderNames.SecWebSocketVersion, "13"); 838request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
Microsoft.DotNet.Build.Tasks.Feed (2)
src\CreateAzureDevOpsFeed.cs (1)
137client.DefaultRequestHeaders.Add(
src\PublishArtifactsInManifestBase.cs (1)
882client.DefaultRequestHeaders.Add(
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
57client.DefaultRequestHeaders.Add(
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelperFactory.cs (1)
153getToolRequest.Headers.Add("X-TFS-FedAuthRedirect", "Suppress");
Microsoft.DotNet.VersionTools (4)
Automation\GitHubApi\GitHubClient.cs (3)
57_httpClient.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json"); 58_httpClient.DefaultRequestHeaders.Add("User-Agent", auth?.User ?? DefaultUserAgent); 61_httpClient.DefaultRequestHeaders.Add("Authorization", $"token {auth.AuthToken}");
Automation\VstsApi\VstsAdapterClient.cs (1)
55_httpClient.DefaultRequestHeaders.Add(
Microsoft.Extensions.Http.Diagnostics (1)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
49request.Headers.Add(TelemetryConstants.ClientApplicationNameHeader, _applicationName);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Benchmarks\HeadersReaderBenchmark.cs (1)
38Request.Headers.Add($"Header{i}", $"Value{i}");
Microsoft.Extensions.Http.Diagnostics.Tests (52)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (1)
67httpResponseMessage.Headers.Add(TelemetryConstants.ServerApplicationNameHeader, serverName);
Logging\AcceptanceTests.cs (5)
168httpRequestMessage.Headers.Add("requestHeader", "Request Value"); 184httpRequestMessage2.Headers.Add("requestHeader", "Request Value"); 249httpRequestMessage.Headers.Add("requestHeader", "Request Value"); 271httpRequestMessage2.Headers.Add("requestHeader", "Request Value"); 685httpRequestMessage.Headers.Add("requestHeader", "Request Value");
Logging\HttpClientLoggerTest.cs (16)
190httpRequestMessage.Headers.Add(TestRequestHeader, testRequestHeaderValue); 191httpRequestMessage.Headers.Add("Header3", testRequestHeaderValue); 199httpResponseMessage.Headers.Add(TestResponseHeader, testResponseHeaderValue); 200httpResponseMessage.Headers.Add("Header3", testRequestHeaderValue); 285httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue); 292httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue); 391httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue); 399httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue); 487httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue); 495httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue); 601httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue); 608httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue); 860requestContent.Headers.Add("Content-Type", TextPlain); 868httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue); 871responseContent.Headers.Add("Content-Type", TextPlain); 878httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
Logging\HttpHeadersReaderTest.cs (13)
74httpRequest.Headers.Add("Header1", "Value.1"); 75httpRequest.Headers.Add("Header2", "Value.2"); 76httpResponse.Headers.Add("Header3", "Value.3"); 77httpResponse.Headers.Add("Header4", "Value.4"); 78httpRequest.Headers.Add("Header5", string.Empty); 79httpResponse.Headers.Add("Header6", string.Empty); 80httpResponse.Headers.Add("Header7", "Value.7"); 134requestContent.Headers.Add("Content-Header1", "Content.1"); 137httpRequest.Headers.Add("Header1", "Value.1"); 138httpRequest.Headers.Add("Header2", "Value.2"); 143responseContent.Headers.Add("Content-Header2", "Content.2"); 146httpResponse.Headers.Add("Header3", "Value.3"); 147httpResponse.Headers.Add("Header4", "Value.4");
Logging\HttpRequestBodyReaderTest.cs (1)
189httpRequest.Content.Headers.Add("Content-type", "text/plain");
Logging\HttpRequestReaderTest.cs (15)
87httpRequestMessage.Headers.Add(header1.Key, header1.Value); 88httpRequestMessage.Headers.Add(header3.Key, header3.Value); 96httpResponseMessage.Headers.Add(header2.Key, header2.Value); 97httpResponseMessage.Headers.Add(header3.Key, header3.Value); 213httpRequestMessage.Headers.Add(header1.Key, header1.Value); 225httpResponseMessage.Headers.Add(header2.Key, header2.Value); 288httpRequestMessage.Headers.Add(header1.Key, header1.Value); 300httpResponseMessage.Headers.Add(header2.Key, header2.Value); 360httpRequestMessage.Headers.Add(header1.Key, header1.Value); 418httpRequestMessage.Headers.Add(header1.Key, header1.Value); 430httpResponseMessage.Headers.Add(header2.Key, header2.Value); 489httpRequestMessage.Headers.Add(header1.Key, header1.Value); 497httpResponseMessage.Headers.Add(header2.Key, header2.Value); 556httpRequestMessage.Headers.Add(header1.Key, header1.Value); 565httpResponseMessage.Headers.Add(header2.Key, header2.Value);
Logging\HttpResponseBodyReaderTest.cs (1)
157httpResponse.Content.Headers.Add("Content-type", "text/plain");
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\RequestMessageSnapshotTests.cs (1)
63initialRequest.Headers.Add("Authorization", "Bearer token");
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
77message.Headers.Add("x-ms-blob-type", "AppendBlob"); 78message.Headers.Add("x-ms-version", "2016-05-31");
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
263request.Headers.Add("Accept", acceptContentType);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
263request.Headers.Add("Accept", acceptContentType);
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
263request.Headers.Add("Accept", acceptContentType);
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
263request.Headers.Add("Accept", acceptContentType);
Templates.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
263request.Headers.Add("Accept", acceptContentType);