1 write to HttpContext
Microsoft.AspNetCore.Mvc.Abstractions (1)
Formatters\InputFormatterContext.cs (1)
74HttpContext = httpContext;
25 references to HttpContext
FormatterWebSite (1)
StringInputFormatter.cs (1)
22var request = context.HttpContext.Request;
Microsoft.AspNetCore.Mvc.Core (10)
Formatters\InputFormatter.cs (3)
55var contentType = context.HttpContext.Request.ContentType; 96var canHaveBody = context.HttpContext.Features.Get<IHttpRequestBodyDetectionFeature>()?.CanHaveBody; 98canHaveBody ??= context.HttpContext.Request.ContentLength != 0;
Formatters\SystemTextJsonInputFormatter.cs (1)
60var httpContext = context.HttpContext;
Formatters\TextInputFormatter.cs (2)
43context.HttpContext.Request.ContentType); 84var requestContentType = context.HttpContext.Request.ContentType;
ModelBinding\Binders\BodyModelBinder.cs (4)
206var contentType = formatterContext.HttpContext.Request.ContentType; 218var contentType = formatterContext.HttpContext.Request.ContentType; 230var contentType = formatterContext.HttpContext.Request.ContentType; 232if (formatterContext.HttpContext.Request.HasFormContentType)
Microsoft.AspNetCore.Mvc.Core.Test (9)
Formatters\InputFormatterTest.cs (1)
421context.HttpContext.Request.ContentLength = 0;
Formatters\TextInputFormatterTest.cs (8)
26context.HttpContext.Request.ContentType = "application/json;charset=utf-8"; 27context.HttpContext.Request.ContentLength = 1; 54context.HttpContext.Request.ContentLength = 1; 76context.HttpContext.Request.ContentType = "application/json;charset=" + charset; 100context.HttpContext.Request.ContentType = "application/json;charset=utf-8"; 126context.HttpContext.Request.ContentType = "application/json;charset=" + charset; 160context.HttpContext.Request.ContentType = "application/json;charset=\"" + charset + "\""; 194context.HttpContext.Request.ContentType = contentType;
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
XmlDataContractSerializerInputFormatter.cs (1)
104var request = context.HttpContext.Request;
XmlSerializerInputFormatter.cs (1)
88var request = context.HttpContext.Request;
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerInputFormatterTest.cs (1)
472Assert.True(context.HttpContext.Request.Body.CanRead);
XmlSerializerInputFormatterTest.cs (1)
489Assert.True(context.HttpContext.Request.Body.CanRead);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
101var httpContext = context.HttpContext;