• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 package software.amazon.awssdk.crt.http;
7 
8 import software.amazon.awssdk.crt.http.HttpVersion;
9 
10 /**
11  * Represents a single Client Request to be sent on a HTTP connection
12  */
13 public class Http2Request extends HttpRequestBase {
14     /**
15      * An empty HTTP/2 Request.
16      */
Http2Request()17     public Http2Request() {
18         this(new HttpHeader[] {}, null);
19     }
20 
21     /**
22      * An empty HTTP/2 Request with headers and body stream.
23      *
24      * @param headers    set of http request headers to include, note: pseudo
25      *                   headers should be set to make a good HTTP/2 request.
26      * @param bodyStream (optional) interface to an object that will stream out the
27      *                   request body
28      */
Http2Request(HttpHeader[] headers, HttpRequestBodyStream bodyStream)29     public Http2Request(HttpHeader[] headers, HttpRequestBodyStream bodyStream) {
30         super(headers, bodyStream);
31         this.version = HttpVersion.HTTP_2;
32     }
33 
34 }
35