Table of Contents

Class RestApiFormUrlEncodedMediaTypeFormatter

Namespace
Ecng.Net
Assembly
Ecng.Net.Clients.dll

Represents a formatter for REST API form URL encoded media types.

public class RestApiFormUrlEncodedMediaTypeFormatter : FormUrlEncodedMediaTypeFormatter
Inheritance
RestApiFormUrlEncodedMediaTypeFormatter
Extension Methods

Constructors

RestApiFormUrlEncodedMediaTypeFormatter()

Initializes a new instance of the RestApiFormUrlEncodedMediaTypeFormatter class.

public RestApiFormUrlEncodedMediaTypeFormatter()

Methods

CanWriteType(Type)

Determines whether this instance can write objects of the specified type.

public override bool CanWriteType(Type type)

Parameters

type Type

The type of the object to write.

Returns

bool

true if the type can be written; otherwise, false.

WriteToStreamAsync(Type, object, Stream, HttpContent, TransportContext, CancellationToken)

Asynchronously writes the specified value to the given stream.

public override Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)

Parameters

type Type

The type of the value to write.

value object

The value to write.

writeStream Stream

The stream to which the content is written.

content HttpContent

The HTTP content.

transportContext TransportContext

The transport context.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous write operation.