StatusCodesWithBody class

Annotate methods with HTTP status codes that have body

By default only status code 200 is supported

Example, if you want to add for status codes 400 and 401

@Route.get('/api/v0/user/login')
@StatusCodesWithBody([200, 400, 401])
Future<LoginResponse> login();

Constructors

StatusCodesWithBody(List<int> codes)
const

Properties

codes List<int>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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