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
- payloadFormat
Type: Microsoft.Data.OData.ODataFormat
The format to use for writing the payload.
Remarks
Calling this method replaces any previously set content-type settings.