public DurableHttpResponse(
     HttpStatusCode statusCode,
     IDictionary <string, StringValues> headers = null,
     string content = null)
 {
     this.StatusCode = statusCode;
     this.Headers    = HttpHeadersConverter.CreateCopy(headers);
     this.Content    = content;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DurableHttpRequest"/> class.
 /// </summary>
 /// <param name="method">Method used for HTTP request.</param>
 /// <param name="uri">Uri used to make the HTTP request.</param>
 /// <param name="headers">Headers added to the HTTP request.</param>
 /// <param name="content">Content added to the body of the HTTP request.</param>
 /// <param name="tokenSource">AAD authentication attached to the HTTP request.</param>
 /// <param name="asynchronousPatternEnabled">Specifies whether the DurableHttpRequest should handle the asynchronous pattern.</param>
 public DurableHttpRequest(
     HttpMethod method,
     Uri uri,
     IDictionary <string, StringValues> headers = null,
     string content                  = null,
     ITokenSource tokenSource        = null,
     bool asynchronousPatternEnabled = true)
 {
     this.Method      = method;
     this.Uri         = uri;
     this.Headers     = HttpHeadersConverter.CreateCopy(headers);
     this.Content     = content;
     this.TokenSource = tokenSource;
     this.AsynchronousPatternEnabled = asynchronousPatternEnabled;
 }