createRequestContext method

  1. @override
Future<HttpRequestContext> createRequestContext(
  1. HttpRequest request,
  2. HttpResponse response
)
override

Implementation

@override
Future<HttpRequestContext> createRequestContext(
    HttpRequest request, HttpResponse response) {
  var path = request.uri.path.replaceAll(_straySlashes, '');
  if (path.isEmpty) path = '/';
  return HttpRequestContext.from(request, app, path);
}