Appearance
Success Method
Definition
- Namespace:
JASE.Web - Assembly:
JASE.Web.dll
PayloadResult Success(object value = null, int statusCode = null)
csharp
PayloadResult Success(object value = null, int statusCode = null)Creates a successful PayloadResult with the specified response payload.
Parameters
| Name | Description |
|---|---|
statusCode | The HTTP status code to return. Defaults to Status200OK. |
value | The object to serialize into the response body. May be to indicate that no response body should be written. |
Returns
A PayloadResult representing a successful response.
Remarks
This method is intended for successful outcomes. The provided value will be serialized using the configured IActionResultSerializer.
No automatic status code transformation is performed. If value is , the response will still use the specified statusCode and will not include a response body.