Class RestApiFormUrlEncodedMediaTypeFormatter
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
typeTypeThe 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
typeTypeThe type of the value to write.
valueobjectThe value to write.
writeStreamStreamThe stream to which the content is written.
contentHttpContentThe HTTP content.
transportContextTransportContextThe transport context.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task
A task that represents the asynchronous write operation.