Share via


ODataMessageWriterSettings.SetContentType Method (ODataFormat)

Sets the format to be used when writing the payload. This will automatically set a compatible content type header.

Namespace:  Microsoft.Data.OData
Assembly:  Microsoft.Data.OData (in Microsoft.Data.OData.dll)

Syntax

'Declaration
Public Sub SetContentType ( _
    payloadFormat As ODataFormat _
)
'Usage
Dim instance As ODataMessageWriterSettings 
Dim payloadFormat As ODataFormat

instance.SetContentType(payloadFormat)
public void SetContentType(
    ODataFormat payloadFormat
)
public:
void SetContentType(
    ODataFormat^ payloadFormat
)
member SetContentType : 
        payloadFormat:ODataFormat -> unit
public function SetContentType(
    payloadFormat : ODataFormat
)

Parameters

Remarks

Calling this method replaces any previously set content-type settings.

See Also

Reference

ODataMessageWriterSettings Class

SetContentType Overload

Microsoft.Data.OData Namespace