angel_framework 2.0.0-alpha angel_framework: ^2.0.0-alpha copied to clipboard
A high-powered HTTP server with DI, routing and more. When combined with the other packages in the Angel ecosystem, this package can be used to make robust application servers for API's, traditional s [...]
2.0.0-alpha #
- Removed
random_string
dependency. - Moved reflection to
package:angel_container
. - Upgraded
package:file
to5.0.0
. ResponseContext.sendFile
now usespackage:file
.- Abandon
ContentType
in favor ofMediaType
. - Changed view engine to use
Map<String, dynamic>
. - Remove dependency on
package:json_god
by default. - Remove dependency on
package:dart2_constant
. - Remove
contentType
argument inResponseContext.serialize
. - Moved
lib/hooks.dart
intopackage:angel_hooks
. - Moved
TypedService
intopackage:angel_typed_service
. - Completely removed the
AngelBase
class. - Removed all
@deprecated
symbols. Service.toId
was renamed toService.parseId
; it also now uses its single type argument to determine how to parse a value.- In addition, this method was also made
static
.
- In addition, this method was also made
RequestContext
andResponseContext
are now generic, and take a single type argument pointing to the underlying request/response type, respectively.RequestContext.io
andResponseContext.io
are now permanently gone.HttpRequestContextImpl
andHttpResponseContextImpl
were renamed toHttpRequestContext
andHttpResponseContext
.- Lazy-parsing request bodies is now the default;
Angel.lazyParseBodies
was replaced withAngel.eagerParseRequestBodies
. Angel.storeOriginalBuffer
->Angel.storeRawRequestBuffers
.- The methods
lazyBody
,lazyFiles
, andlazyOriginalBuffer
onResponseContext
were all replaced withparseBody
,parseUploadedFiles
, andparseRawRequestBuffer
, respectively. - Removed the synchronous equivalents of the above methods (
body
,files
, andoriginalBuffer
), as well asquery
. - Removed
Angel.injections
andRequestContext.injections
. - Removed
Angel.inject
andRequestContext.inject
. - Removed a dependency on
package:pool
, which also meant removingAngelHttp.throttle
. - Remove the
RequestMiddleware
typedef; from now on, one should useResponseContext.end
exclusively to close responses. waterfall
will now only acceptRequestHandler
.Routable
, and all of its subclasses, now extendRouter<RequestHandler>
, and therefore only take routes in the form ofFutureOr myFunc(RequestContext, ResponseContext res)
.@Middleware
now takes anIterable
ofRequestHandler
s.@Expose.path
now must be aString
, not just anyPattern
.@Expose.middleware
now takesIterable<RequestHandler>
, instead of justList
.createDynamicHandler
was renamed toioc
, and is now used to run IoC-aware handlers in a type-safe manner.RequestContext.params
is now aMap<String, dynamic>
, rather than just aMap
.- Removed
RequestContext.grab
. - Removed
RequestContext.properties
. - Removed the defunct
debug
property where it still existed. Routable.use
now only accepts aService
.- The above change removes the concept of "nested apps," which are messy to maintain, and not very elegant.
- Removed
Angel.createZoneForRequest
. - Removed
Angel.defaultZoneCreator
. - Added all flags to the
Angel
constructor, ex.Angel.eagerParseBodies
. - Fix a bug where synchronous errors in
handleRequest
would not be caught. AngelHttp.useZone
now defaults tofalse
.ResponseContext
now starts in streaming mode by default; the response buffer is opt-in, as in many cases it is unnecessary and slows down response time.ResponseContext.streaming
was replaced byResponseContext.isBuffered
.- Made
LockableBytesBuilder
public. - Removed the now-obsolete
ResponseContext.willCloseItself
. - Removed
ResponseContext.dispose
. - Removed the now-obsolete
ResponseContext.end
. - Removed the now-obsolete
ResponseContext.releaseCorrespondingRequest
. preInject
now takes aReflector
as its second argument.Angel.reflector
defaults toconst EmptyReflector()
, disabling reflection out-of-the-box.