Represents an action result that returns formatted content.
Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Inheritance Hierarchy
System.Object
  System.Web.Http.Results.FormattedContentResult<T>
Syntax
public class FormattedContentResult<T> : IHttpActionResult
generic<typename T>
public ref class FormattedContentResult : IHttpActionResult
type FormattedContentResult<'T> = 
    class
        interface IHttpActionResult
    end
Public Class FormattedContentResult(Of T)
    Implements IHttpActionResult
Type Parameters
- T
 The type of content in the entity body.
Constructors
| Name | Description | |
|---|---|---|
| .jpeg) | FormattedContentResult<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, ApiController) | Initializes a new instance of the FormattedContentResult<T> class with the values provided. | 
| .jpeg) | FormattedContentResult<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, HttpRequestMessage) | Initializes a new instance of the FormattedContentResult<T> class with the values provided. | 
Properties
| Name | Description | |
|---|---|---|
| .jpeg) | Content | Gets the content value to format in the entity body. | 
| .jpeg) | Formatter | Gets the formatter to use to format the content. | 
| .jpeg) | MediaType | Gets the value for the Content-Type header, or null to have the formatter pick a default value. | 
| .jpeg) | Request | Gets the request message which led to this result. | 
| .jpeg) | StatusCode | Gets the HTTP status code for the response message. | 
Methods
| Name | Description | |
|---|---|---|
| .jpeg) | Equals(Object) | (Inherited from Object.) | 
| .jpeg) | ExecuteAsync(CancellationToken) | |
| .jpeg) | Finalize() | (Inherited from Object.) | 
| .jpeg) | GetHashCode() | (Inherited from Object.) | 
| .jpeg) | GetType() | (Inherited from Object.) | 
| .jpeg) | MemberwiseClone() | (Inherited from Object.) | 
| .jpeg) | ToString() | (Inherited from Object.) | 
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
System.Web.Http.Results Namespace
Return to top