public InterceptedResponse(IOnPremiseTargetResponse response) { RequestId = response.RequestId; OriginId = response.OriginId; RequestStarted = response.RequestStarted; RequestFinished = response.RequestFinished; StatusCode = response.StatusCode; HttpHeaders = response.HttpHeaders; Stream = response.Stream; }
private async Task PostResponseAsync(RequestContext ctx, IOnPremiseTargetResponse response, CancellationToken cancellationToken) { ctx.IsRelayServerNotified = true; await PostToRelayAsync("/forward", headers => headers.Add("X-TTRELAY-METADATA", JsonConvert.SerializeObject(response)), new StreamContent(response.Stream ?? Stream.Null, 0x10000), cancellationToken).ConfigureAwait(false); }