<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.0.0-beta2" />

ObjectContent

public class ObjectContent : HttpContent
Contains a value as well as an associated MediaTypeFormatter that will be used to serialize the value when writing this content.
public MediaTypeFormatter Formatter { get; }

Gets the media-type formatter associated with this content instance.

public Type ObjectType { get; }

Gets the type of object managed by this ObjectContent instance.

public object Value { get; set; }

Gets or sets the value of the content.

public ObjectContent(Type type, object value, MediaTypeFormatter formatter)

Initializes a new instance of the ObjectContent class.

public ObjectContent(Type type, object value, MediaTypeFormatter formatter, string mediaType)

Initializes a new instance of the ObjectContent class.

public ObjectContent(Type type, object value, MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType)

Initializes a new instance of the ObjectContent class.