AngelHttp class

Adapts dart:io's HttpServer to serve Angel.

Inheritance

Constructors

AngelHttp(Angel app, {bool useZone = true})
factory
AngelHttp.custom(Angel app, Future<HttpServer> serverGenerator(dynamic, int), {bool useZone = true})
An instance mounted on a server started by the serverGenerator.
factory
AngelHttp.fromSecurityContext(Angel app, SecurityContext context, {bool useZone = true})
factory
AngelHttp.secure(Angel app, String certificateChainPath, String serverKeyPath, {String password, bool useZone = true})
Creates an HTTPS server. [...]
factory

Properties

app Angel
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
httpServer HttpServer
Use server instead.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
server HttpServer
The native server running this instance.
read-only, inherited
serverGenerator Future<HttpServer> Function(dynamic, int)
The function used to bind this instance to a server..
final, inherited
uri Uri
The path at which this server is listening for requests.
read-only, override
useZone bool
final, inherited

Methods

addCookies(HttpResponse response, Iterable<Cookie> cookies) → void
override
close() Future<HttpServer>
Shuts down the underlying server.
override
closeResponse(HttpResponse response) Future
override
createRequestContext(HttpRequest request, HttpResponse response) Future<HttpRequestContext>
override
createResponseContext(HttpRequest request, HttpResponse response, [HttpRequestContext correspondingRequest]) Future<HttpResponseContext>
override
createResponseStreamFromRawRequest(HttpRequest request) Stream<HttpResponse>
override
generateServer(dynamic address, int port) Future<HttpServer>
inherited
handleAngelHttpException(AngelHttpException e, StackTrace st, RequestContext req, ResponseContext res, HttpRequest request, HttpResponse response, {bool ignoreFinalizers = false}) Future
Handles an AngelHttpException.
inherited
handleRawRequest(HttpRequest request, HttpResponse response) Future
Handles a single request.
inherited
handleRequest(HttpRequest request) Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
sendResponse(HttpRequest request, HttpResponse response, RequestContext req, ResponseContext res, {bool ignoreFinalizers = false}) Future
Sends a response.
inherited
setChunkedEncoding(HttpResponse response, bool value) → void
override
setContentLength(HttpResponse response, int length) → void
override
setHeader(HttpResponse response, String key, String value) → void
override
setStatusCode(HttpResponse response, int value) → void
override
startServer([dynamic address, int port]) Future<HttpServer>
Starts, and returns the server.
inherited
toString() String
Returns a string representation of this object.
inherited
writeStringToResponse(HttpResponse response, String value) → void
override
writeToResponse(HttpResponse response, List<int> data) → void
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited