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
type
TypeThe 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
TypeThe type of the value to write.
value
objectThe value to write.
writeStream
StreamThe stream to which the content is written.
content
HttpContentThe HTTP content.
transportContext
TransportContextThe transport context.
cancellationToken
CancellationTokenA token to monitor for cancellation requests.
Returns
- Task
A task that represents the asynchronous write operation.