MSDN Library

MimeTypeAttribute Class

Indicates the MIME type of HTTP request.


Namespace:  System.Data.Services
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class MimeTypeAttribute : Attribute

The MimeTypeAttribute type exposes the following members.

Public methodMimeTypeAttributeInitializes a new instance of the MimeTypeAttribute class.

Public propertyMemberNameGets the name of the attribute.
Public propertyMimeTypeGets the MIME type of a request.
Public propertyTypeId (Inherited from Attribute.)

Public methodEquals (Inherited from Attribute.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodMatch (Inherited from Attribute.)
Public methodToString (Inherited from Object.)

The mechanism used to control the serialization format used for a request sent from a client to a data service is the Content-Type HTTP header. The default mechanism controlling the format used in a response from a data service is the Accept HTTP header. The Accept header is used to indicate that the response to the request is limited to a specific set of MIME types. The MIME type returned from parsing the accept header is then used as the response format.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft