ApiController.Ok Method
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
Ok() | Creates an OkResult (200 OK). |
|
Ok<T>(T) | Creates an OkNegotiatedContentResult<T> with the specified values. |
See Also
ApiController Class
System.Web.Http Namespace
Return to top
ApiController.Ok Method ()
Creates an OkResult (200 OK).
Syntax
protected internal virtual OkResult Ok()
public protected:
virtual OkResult^ Ok()
abstract Ok : unit -> OkResult
override Ok : unit -> OkResult
Protected Friend Overridable Function Ok As OkResult
Return Value
Type: System.Web.Http.Results.OkResult
An OkResult.
Return to top
ApiController.Ok<T> Method (T)
Creates an OkNegotiatedContentResult<T> with the specified values.
Syntax
protected internal virtual OkNegotiatedContentResult<T> Ok<T>(
T content
)
public protected:
generic<typename T>
virtual OkNegotiatedContentResult<T>^ Ok(
T content
)
abstract Ok<'T> :
content:'T -> OkNegotiatedContentResult<'T>
override Ok<'T> :
content:'T -> OkNegotiatedContentResult<'T>
Protected Friend Overridable Function Ok(Of T) (
content As T
) As OkNegotiatedContentResult(Of T)
Parameters
content
Type: TThe content value to negotiate and format in the entity body.
Return Value
Type: System.Web.Http.Results.OkNegotiatedContentResult<T>
An OkNegotiatedContentResult<T> with the specified values.
Type Parameters
- T
The type of content in the entity body.
Return to top