NOW Alpha ready :)
This commit is contained in:
parent
2bbb7e549d
commit
5c5ab40876
3 changed files with 8 additions and 3 deletions
|
@ -19,6 +19,9 @@ class ResponseContext extends Extensible {
|
|||
/// The [Angel] instance that is sending a response.
|
||||
AngelBase app;
|
||||
|
||||
/// Is `Transfer-Encoding` chunked?
|
||||
bool chunked;
|
||||
|
||||
/// Any and all cookies to be sent to the user.
|
||||
final List<Cookie> cookies = [];
|
||||
|
||||
|
|
|
@ -254,6 +254,8 @@ class Angel extends AngelBase {
|
|||
for (var key in res.headers.keys) {
|
||||
request.response.headers.set(key, res.headers[key]);
|
||||
}
|
||||
|
||||
request.response.headers.chunkedTransferEncoding = res.chunked ?? true;
|
||||
|
||||
request.response
|
||||
..statusCode = res.statusCode
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:angel_framework/angel_framework.dart';
|
||||
import 'package:angel_route/angel_route.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:test/test.dart';
|
||||
import 'common.dart';
|
||||
|
@ -77,9 +78,8 @@ class SingletonController extends Controller {
|
|||
@Expose("/errands4")
|
||||
class ErrandController extends Controller {
|
||||
@Expose("/")
|
||||
errand(Errand errand, Match match) {
|
||||
expect(match, isNotNull);
|
||||
print('Match: ${match.group(0)}');
|
||||
errand(Errand errand, MiddlewarePipeline pipeline) {
|
||||
expect(pipeline, isNotNull);
|
||||
return errand.text;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue