Class AngularJsonMediaTypeFormatter
This will format the JSON output for use with AngularJs's approach to JSON Vulnerability attacks
Inheritance
System.Object
Namespace: Umbraco.Web.WebApi
Assembly: Umbraco.Web.dll
Syntax
public class AngularJsonMediaTypeFormatter : JsonMediaTypeFormatter
Remarks
See: http://docs.angularjs.org/api/ng.$http (Security considerations)
Fields
View SourceXsrfPrefix
Declaration
public const string XsrfPrefix = ")]}',\n"
Field Value
Type | Description |
---|---|
System.String |
Methods
View SourceWriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext)
This will prepend the special chars to the stream output that angular will strip
Declaration
public override async Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | |
System.Object | value | |
System.IO.Stream | writeStream | |
HttpContent | content | |
System.Net.TransportContext | transportContext |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |