Ejemplo n.º 1
0
        private async Task <HttpResponse> GetResponseAsync(HttpResponseMessage response, IHttpResponseBodyFeature httpResponseBodyFeature)
        {
            ProxyHeaders(httpContextAccessor.HttpContext.Response, response);

            httpContextAccessor.HttpContext.Response.StatusCode = (int)response.StatusCode;
            await httpResponseBodyFeature.StartAsync();

            await ProxyBodyAsync(httpContextAccessor.HttpContext.Response, response);

            return(httpContextAccessor.HttpContext.Response);
        }
 public Task StartAsync(CancellationToken cancellationToken = default)
 {
     return(inner.StartAsync(cancellationToken));
 }
Ejemplo n.º 3
0
 public Task StartAsync(CancellationToken token = default)
 {
     OnWrite();
     return(_innerBodyFeature.StartAsync(token));
 }
Ejemplo n.º 4
0
 public Task StartAsync(CancellationToken cancellationToken = default)
 {
     return(_responseBodyFeature.StartAsync(cancellationToken));
 }
Ejemplo n.º 5
0
 public Task StartAsync(CancellationToken cancellationToken = default)
 {
     _responseFeature.HasStarted = true;
     return(_innerResponseBodyFeature.StartAsync(cancellationToken));
 }
Ejemplo n.º 6
0
 public Task StartAsync(CancellationToken cancellationToken) =>
 _initialResponseFeature.StartAsync(cancellationToken);
 public async Task StartAsync(CancellationToken cancellationToken = new CancellationToken()) =>
 await _priorFeature.StartAsync(cancellationToken);
        public Task StartAsync(CancellationToken token = default)
        {
            Initialize();

            return(_responseBodyFeature.StartAsync(token));
        }