22 references to ContentTypeConstants
Microsoft.AspNetCore.Http.Extensions (7)
HttpRequestJsonExtensions.cs (1)
286if (mt.MediaType.Equals(ContentTypeConstants.JsonContentType, StringComparison.OrdinalIgnoreCase))
HttpResponseJsonExtensions.cs (5)
91response.ContentType = contentType ?? ContentTypeConstants.JsonContentTypeWithCharset; 122response.ContentType = contentType ?? ContentTypeConstants.JsonContentTypeWithCharset; 164response.ContentType = contentType ?? ContentTypeConstants.JsonContentTypeWithCharset; 270response.ContentType = contentType ?? ContentTypeConstants.JsonContentTypeWithCharset; 321response.ContentType = contentType ?? ContentTypeConstants.JsonContentTypeWithCharset;
RequestDelegateFactory.cs (1)
128private static readonly string[] DefaultAcceptsAndProducesContentType = new[] { ContentTypeConstants.JsonContentType };
Microsoft.AspNetCore.Http.Extensions.Tests (15)
HttpResponseJsonExtensionsTests.cs (15)
32Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 51Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 71Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 103Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 173Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 192Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 255Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 271Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 296Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 324Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 358Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 392Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 426Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 460Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType); 481Assert.Equal(ContentTypeConstants.JsonContentTypeWithCharset, context.Response.ContentType);