Request.hijack() now takes a callback that accepts a single
StreamChannel argument rather than separate
StreamSink arguments. The old callback signature is still supported, but should be considered deprecated.
OnHijackCallback typedefs are deprecated.
Content-Typeheader didn‘t interact properly with the
new Response()if it wasn’t lowercase.
shelf_ioadapter detects an error, print the request context as well as the error itself.
Server interface representing an adapter that knows its own URL.
ServerHandler class that exposes a
Server backed by a
IOServer class that implements
Server in terms of
Mapinstances and related dependencies.
Response.change()are marked read whenever the original message is read, and vice-versa. This means that it's possible to read a message on which
change()has been called and to call
change()on a message more than once, as long as
read()is called on only one of those messages.
bodynamed argument to
Updated minimum SDK to
Allow an empty
url parameter to be passed in to
new Request(). This fits the stated semantics of the class, and should not have been forbidden.
logRequestsoutputs a better message a request has a query string.
shelf_io now takes a
Response.context parameter that controls
Fixed spelling errors in README and code comments.
Breaking change: The semantics of
Request.url have been overhauled, and the former has been renamed to
handlerPath is now the root-relative URL path to the current handler, while
url's path is the relative path from the current handler to the requested. The new semantics are easier to describe and to understand.
Practically speaking, the main difference is that the
/ at the beginning of
url's path has been moved to the end of
handlerPath. This makes
url's path easier to parse using the
Request.change's handling of
url has also changed. Instead of taking both parameters separately and requiring that the user manually maintain all the associated guarantees, it now takes a single
path parameter. This parameter is the relative path from the current
handlerPath to the next one, and sets both
url on the new
Requestto support the
createMiddleware to only catch errors if
errorHandler is provided.
shelf_io to more gracefully handle errors when parsing
Request.changeto include the original
onHijackcallback if one exists.
Added default body text for
Response.notFound if null is provided.
Clarified documentation on a number of
README links to point to latest docs on
shelf_io adapter now sends the
Date HTTP header by default.
Fixed logic for setting Server header in
Cascade helper that runs handlers in sequence until one returns a response that's neither a 404 nor a 405.
Request.change method that copies a request with new header values.
Request.hijack method that allows handlers to gain access to the underlying HTTP socket.
Capture all asynchronous errors thrown by handlers if they would otherwise be top-leveled.
Add more detail to the README about handlers, middleware, and the rules for implementing an adapter.
Responsefor passing data among handlers and middleware.
scheduled_testdevelopment dependency up to v0.12.0
Access to headers for
Response is now case-insensitive.
The constructor for
Request has been simplified.
Request now exposes
url which replaces
Removed old testing infrastructure.
Updated documentation address.
pubspecdetails for move to Dart SDK.
int get contentLength
DateTime get expires
DateTime get lastModified
contentLengthis now read from
headers. The constructor argument has been removed.
Stream<List<int>> bodyconstructor argument.
Future<String> readAsString([Encoding encoding])
DateTime get ifModifiedSince
String get mimeType
Encoding get encoding
Shelfprefix from all classes.
Responsehas drastically different constructors.
Responsenow accepts a body of either