6 implementations of Accept
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
62public StringValues Accept
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
62public StringValues Accept
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.Generated.cs (3)
596StringValues IHeaderDictionary.Accept 9921StringValues IHeaderDictionary.Accept 15618StringValues IHeaderDictionary.Accept
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
62public StringValues Accept
33 writes to Accept
InMemory.FunctionalTests (6)
Http2\Http2StreamTests.cs (2)
2474Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 2517context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Accept";
Http3\Http3StreamTests.cs (2)
1018Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 1049context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Accept";
ResponseHeaderTests.cs (2)
25Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Accept = "Custom 你好 Accept"); // Not special cased 57context.Response.Headers.Accept = "Custom 你好 Accept";
Microsoft.AspNetCore.Http.Extensions.Tests (4)
HeaderDictionaryTypeExtensionsTest.cs (3)
168context.Request.Headers.Accept = "text/plain; q=0.9, text/other, */*"; 194context.Request.Headers.Accept = "invalid"; 205context.Request.Headers.Accept = "text/plain; q=0.5, text/html; q=0.8";
ProblemDetailsDefaultWriterTest.cs (1)
686context.Request.Headers.Accept = contentType;
Microsoft.AspNetCore.Mvc.Core.Test (17)
Formatters\TextOutputFormatterTests.cs (1)
44httpRequest.Headers.Accept = "application/acceptCharset";
Infrastructure\DefaultOutputFormatterSelectorTest.cs (8)
33context.HttpContext.Request.Headers.Accept = "application/xml"; // This will not be used 63context.HttpContext.Request.Headers.Accept = "application/xml"; // This will not be used 92context.HttpContext.Request.Headers.Accept = "application/xml"; // This will not be used 163context.HttpContext.Request.Headers.Accept = acceptHeader; 222context.HttpContext.Request.Headers.Accept = "text/custom,application/custom"; 257context.HttpContext.Request.Headers.Accept = "text/custom,application/custom"; 286context.HttpContext.Request.Headers.Accept = "text/custom"; 315context.HttpContext.Request.Headers.Accept = "text/custom, text/custom2";
Infrastructure\ObjectResultExecutorTest.cs (8)
26httpContext.Request.Headers.Accept = "application/xml"; // This will not be used 54httpContext.Request.Headers.Accept = "application/xml"; // This will not be used 77httpContext.Request.Headers.Accept = "application/xml"; // This will not be used 99httpContext.Request.Headers.Accept = "application/xml"; // This will not be used 189httpContext.Request.Headers.Accept = "application/json"; // This will not be used 215httpContext.Request.Headers.Accept = "application/xml"; // This will not be used 389actionContext.HttpContext.Request.Headers.Accept = acceptHeader; 426actionContext.HttpContext.Request.Headers.Accept = acceptHeader;
Microsoft.AspNetCore.Rewrite.Tests (1)
IISUrlRewrite\ServerVariableTests.cs (1)
145context.Request.Headers.Accept = "accept";
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Http2\Http2HPackEncoderTests.cs (1)
650headers.Accept = "application/json;";
HttpResponseHeadersTests.cs (4)
163responseHeaders.Accept = value; 176responseHeaders.Accept = "Da\tta"; 201((IHeaderDictionary)responseHeaders).Accept = value; 244((IHeaderDictionary)responseHeaders).Accept = value;
6 references to Accept
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
308var accept = request.Headers.Accept;
Microsoft.AspNetCore.Http.Extensions (2)
DefaultProblemDetailsWriter.cs (1)
29var acceptHeader = httpContext.Request.Headers.Accept.GetList<MediaTypeHeaderValue>();
RequestHeaders.cs (1)
38return Headers.Accept.GetList<MediaTypeHeaderValue>();
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\DefaultOutputFormatterSelector.cs (1)
152AcceptHeaderParser.ParseAcceptHeader(request.Headers.Accept, result);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\TextOutputFormatterTests.cs (1)
59ContentType = new StringSegment(httpRequest.Headers.Accept),
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
HttpRequestHeadersTests.cs (1)
689var parsedAcceptHeaderValue = ((IHeaderDictionary)headers).Accept.ToString();