Export (0) Print
Expand All

MimeTypeAttribute Class

Indicates the MIME type of HTTP request.

System.Object
  System.Attribute
    System.Data.Services.MimeTypeAttribute

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.

  NameDescription
Public methodMimeTypeAttributeInitializes a new instance of the MimeTypeAttribute class.
Top

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

  NameDescription
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.)
Top

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.
Show:
© 2014 Microsoft