Curveball mini core
This package is used for experimentation with Deno, and should not be used in production
Experimental mini core.
This package is used for experimentation with Deno, and should not be used in production
If-Match, If-None-Match, If-Modified-Since,
If-Unmodified-Since.es2019 instead of esnext to ensure that older
Node.js versions are supported.@types/node@13.Content-Type to text/plain for errors that fall without being caught
by an exception handling middleware.Context is no longer a class, it's an interface. It's default
implementation is now BaseContext. This allows plugins to modify the
interface and add new features.redirect() function to Context and Response objects, making it
easier to set a status-code and location header in one step.Prefer parameters: depth-noroot, safe, transclude.is() function will now also match wildcards, such as image/*.rawBody() had an incorrect type. It should always return a Buffer if
the first argument is omitted.application/hal+json content-type if nothing else
was set. This fixes a regression from 0.9.0.Request and Response types are now abstract classes instead of
interfaces. This removes a bunch of duplication.Request objects now have a prefer() method for quickly reading out the
values from the RFC7240 Prefer header.invokeMiddleware function that can be used to
chain and call mutltiple middlewares.NotFound exception if nothing
handled a HTTP request.middlewareCall symbol, it will call that instead.invokeMiddleware function, which is a convenience
method to call many middlewares.Response.body to a stream.Readable object.accept() function ignored changes made my middlewares toAccept header.Context object now has an ip method that can be used to get the ip
address of the client that's connecting.Request and Response objects now have an is() method that can be
used to easily check the Content-Type header of the object. For example
Request.is('json') will return true for application/hal+json.Headers object now has a has() method.Response<T> implies the body
property has type T.ctx.status is now writable.method, path, status, accepts, push, sendInformational,query to Context object. These properties and methods all forward to
the request or response object.404 response, unless aApplication.buildContextFromHttp is now public.Response.type is now settable.Response.push() method.Application.subRequest().MemoryRequest and MemoryResponse.Response.body may now be null.@curveball/core.Buffer and arbitrary objects in response.body. The100 Continue and103 Early Hints for both HTTP/1 and HTTP/2.Application is now the default export.Application.callback now returns a callback instead of implementingthis scope and is also
consistent with Koa.Response.status().Middleware type.Request.rawBody() method.Request.accept() method.Request.type and Response.type.Request.query.Response.body now has type any.Context.state.Application.callback.script and types correctly in package.json.Request, Response, Application, Context, Headers classes.