AngelShelf class
Constructors
-
AngelShelf(Angel app, {FutureOr<
Response> notFound()?})
Properties
- app → Angel
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
incomingRequests
→ StreamController<
Request> -
final
-
notFound
→ (FutureOr<
Response> Function()?) -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
server
↔ Stream<
Request> ? -
The native server running this instance.
getter/setter pairinherited
-
serverGenerator
→ Future<
Stream< Function(dynamic, int)Request> > -
The function used to bind this instance to a server..
no setter
- uri → Uri
-
The path at which this server is listening for requests.
no setter
- useZone → bool
-
finalinherited
Methods
-
addCookies(
ShelfResponseContext? response, Iterable< Cookie> cookies) → void -
close(
) → Future< void> - Shuts down the underlying server.
-
closeResponse(
ShelfResponseContext? response) → Future -
createRequestContext(
Request request, ShelfResponseContext? response) → Future< ShelfRequestContext> -
createResponseContext(
Request request, ShelfResponseContext? response, [ShelfRequestContext? correspondingRequest]) → Future< ShelfResponseContext> -
createResponseStreamFromRawRequest(
Request request) → Stream< ShelfResponseContext?> -
generateServer(
dynamic address, int port) → Future< Stream< Request> > -
inherited
-
handleAngelHttpException(
AngelHttpException e, StackTrace st, RequestContext? req, ResponseContext? res, Request request, ShelfResponseContext? response, {bool ignoreFinalizers = false}) → Future< Response> -
Handles an
AngelHttpException
. -
handler(
Request request) → Future< Response> -
handleRawRequest(
Request request, ShelfResponseContext? response) → Future -
Handles a single request.
inherited
-
middleware(
Handler handler) → Handler -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendResponse(
Request request, ShelfResponseContext? response, RequestContext req, ResponseContext res, {bool ignoreFinalizers = false}) → Future -
Sends a response.
inherited
-
setChunkedEncoding(
ShelfResponseContext? response, bool value) → void -
setContentLength(
ShelfResponseContext? response, int length) → void -
setHeader(
ShelfResponseContext? response, String key, String value) → void -
setStatusCode(
ShelfResponseContext? response, int value) → void -
startServer(
[dynamic address, int port = 0]) → Future< Stream< Request> > -
Starts, and returns the server.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeStringToResponse(
ShelfResponseContext? response, String value) → void -
writeToResponse(
ShelfResponseContext? response, List< int> data) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited