WebEndpointResponse<T> class final

An answer of an operation over HTTP with its own status (and media type), for an EndpointWebExtension that answers more than 200.

return WebEndpointResponse(body: health, status: 503);

Spring Boot (Java): WebEndpointResponse<T>.

Constructors

WebEndpointResponse({T? body, int? status, String? contentType})
An answer of body with status (200 by default; 404 without a body).
const

Properties

body → T?
The body, written as JSON; null for none.
final
contentType → String?
The media type of the answer; null for the one the client asked for.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → int
The HTTP status.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

badRequest → const int
400.
notFound → const int
404.
ok → const int
200.
serviceUnavailable → const int
503.