ReqRest
Show / Hide Table of Contents

Interface IHttpContentSerializer

Represents an element which is able to serialize .NET objects into HttpContent instances.

Consider deriving from HttpContentSerializer instead of implementing this interface directly.

Namespace: ReqRest.Serializers
Assembly: ReqRest.dll
Syntax
public interface IHttpContentSerializer

Methods

Serialize(Nullable<Object>, Nullable<Encoding>)

Serializes the specified content into a new HttpContent instance.

Declaration
HttpContent? Serialize(object? content, Encoding? encoding)
Parameters
Type Name Description
Nullable<Object> content

The object to be serialized into a new HttpContent instance. This can be null.

Nullable<Encoding> encoding

An optional encoding to be used by the serializer if it serializes the content to an HttpContent which requires one. If null, a default encoding is used.

Returns
Type Description
Nullable<HttpContent>

A new HttpContent instance which holds the serialized content or null.

Exceptions
Type Condition
HttpContentSerializationException

Serializing the content failed.

Back to top Copyright © 2019 ReqRest - Generated with DocFX - Material Theme made by Oscar Vásquez - Impressum (Imprint)