Expose class

Exposes a Controller or a Controller method to the Internet. Example:

@Expose('/elements')
class ElementController extends Controller {

  @Expose('/')
  List<Element> getList() => someComputationHere();

  @Expose('/int:elementId')
  getElement(int elementId) => someOtherComputation();

}

Constructors

Expose(String path, {String method = 'GET', Iterable<RequestHandler> middleware = const [], String? as, List<String> allowNull = const []})
const
Expose.method(String method, {Iterable<RequestHandler> middleware = const [], String? as, List<String> allowNull = const []})
const

Properties

allowNull List<String>
final
as String?
final
hashCode int
The hash code for this object.
no setterinherited
method String
final
middleware Iterable<RequestHandler>
final
path String
final
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

Constants

delete → const Expose
get → const Expose
patch → const Expose
post → const Expose
put → const Expose