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.
|
/// The [Angel] instance that is sending a response.
|
||||||
AngelBase app;
|
AngelBase app;
|
||||||
|
|
||||||
|
/// Is `Transfer-Encoding` chunked?
|
||||||
|
bool chunked;
|
||||||
|
|
||||||
/// Any and all cookies to be sent to the user.
|
/// Any and all cookies to be sent to the user.
|
||||||
final List<Cookie> cookies = [];
|
final List<Cookie> cookies = [];
|
||||||
|
|
||||||
|
|
|
@ -255,6 +255,8 @@ class Angel extends AngelBase {
|
||||||
request.response.headers.set(key, res.headers[key]);
|
request.response.headers.set(key, res.headers[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
request.response.headers.chunkedTransferEncoding = res.chunked ?? true;
|
||||||
|
|
||||||
request.response
|
request.response
|
||||||
..statusCode = res.statusCode
|
..statusCode = res.statusCode
|
||||||
..cookies.addAll(res.cookies)
|
..cookies.addAll(res.cookies)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel_framework/angel_framework.dart';
|
||||||
|
import 'package:angel_route/angel_route.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
@ -77,9 +78,8 @@ class SingletonController extends Controller {
|
||||||
@Expose("/errands4")
|
@Expose("/errands4")
|
||||||
class ErrandController extends Controller {
|
class ErrandController extends Controller {
|
||||||
@Expose("/")
|
@Expose("/")
|
||||||
errand(Errand errand, Match match) {
|
errand(Errand errand, MiddlewarePipeline pipeline) {
|
||||||
expect(match, isNotNull);
|
expect(pipeline, isNotNull);
|
||||||
print('Match: ${match.group(0)}');
|
|
||||||
return errand.text;
|
return errand.text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue