Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | Created<T>(String, T) | Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values. | 
| .jpeg) | Created<T>(Uri, T) | Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values. | 
See Also
ApiController Class
System.Web.Http Namespace
Return to top
ApiController.Created<T> Method (String, T)
Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values.
Syntax
protected internal CreatedNegotiatedContentResult<T> Created<T>(
    string location,
    T content
)
public protected:
generic<typename T>
CreatedNegotiatedContentResult<T>^ Created(
    String^ location,
    T content
)
member Created<'T> : 
        location:string *
        content:'T -> CreatedNegotiatedContentResult<'T>
Protected Friend Function Created(Of T) (
    location As String,
    content As T
) As CreatedNegotiatedContentResult(Of T)
Parameters
- location 
 Type: System.String- The location at which the content has been created. 
- content 
 Type: T- The content value to negotiate and format in the entity body. 
Return Value
Type: System.Web.Http.Results.CreatedNegotiatedContentResult<T>
A CreatedNegotiatedContentResult<T> with the specified values.
Type Parameters
- T
 The type of content in the entity body.
Return to top
ApiController.Created<T> Method (Uri, T)
Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values.
Syntax
protected internal virtual CreatedNegotiatedContentResult<T> Created<T>(
    Uri location,
    T content
)
public protected:
generic<typename T>
virtual CreatedNegotiatedContentResult<T>^ Created(
    Uri^ location,
    T content
)
abstract Created<'T> : 
        location:Uri *
        content:'T -> CreatedNegotiatedContentResult<'T>
override Created<'T> : 
        location:Uri *
        content:'T -> CreatedNegotiatedContentResult<'T>
Protected Friend Overridable Function Created(Of T) (
    location As Uri,
    content As T
) As CreatedNegotiatedContentResult(Of T)
Parameters
- location 
 Type: System.Uri- The location at which the content has been created. 
- content 
 Type: T- The content value to negotiate and format in the entity body. 
Return Value
Type: System.Web.Http.Results.CreatedNegotiatedContentResult<T>
A CreatedNegotiatedContentResult<T> with the specified values.
Type Parameters
- T
 The type of content in the entity body.
Return to top