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 |
Returns
| Type | Description |
|---|---|
| Nullable<HttpContent> | A new HttpContent instance which holds the serialized |
Exceptions
| Type | Condition |
|---|---|
| HttpContentSerializationException | Serializing the |