createResponseContext method
Future<HttpResponseContext>
createResponseContext(
- HttpRequest request,
- HttpResponse response, [
- HttpRequestContext? correspondingRequest
override
Implementation
@override
Future<HttpResponseContext> createResponseContext(
HttpRequest request, HttpResponse response,
[HttpRequestContext? correspondingRequest]) {
var context = HttpResponseContext(response, app, correspondingRequest);
context.serializer = (app.serializer ?? json.encode);
context.encoders.addAll(app.encoders);
return Future<HttpResponseContext>.value(context);
}