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 = [];
|
||||
|
||||
|
|
|
@ -255,6 +255,8 @@ class Angel extends AngelBase {
|
|||
request.response.headers.set(key, res.headers[key]);
|
||||
}
|
||||
|
||||
request.response.headers.chunkedTransferEncoding = res.chunked ?? true;
|
||||
|
||||
request.response
|
||||
..statusCode = res.statusCode
|
||||
..cookies.addAll(res.cookies)
|
||||
|
|
|
@ -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