TypedResults.Ok Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Ok() |
Produces a Status200OK response. |
Ok<TValue>(TValue) |
Produces a Status200OK response. |
Ok()
- Source:
- TypedResults.cs
Produces a Status200OK response.
public static Microsoft.AspNetCore.Http.HttpResults.Ok Ok ();
static member Ok : unit -> Microsoft.AspNetCore.Http.HttpResults.Ok
Public Shared Function Ok () As Ok
Returns
The created Ok for the response.
Applies to
Ok<TValue>(TValue)
- Source:
- TypedResults.cs
Produces a Status200OK response.
public static Microsoft.AspNetCore.Http.HttpResults.Ok<TValue> Ok<TValue> (TValue? value);
static member Ok : 'Value -> Microsoft.AspNetCore.Http.HttpResults.Ok<'Value>
Public Shared Function Ok(Of TValue) (value As TValue) As Ok(Of TValue)
Type Parameters
- TValue
The type of object that will be JSON serialized to the response body.
Parameters
- value
- TValue
The value to be included in the HTTP response body.
Returns
The created Ok<TValue> for the response.