Skip to content

Commit 9c42cb0

Browse files
committed
http177 Add http 2 support
Signed-off-by: davidradl <[email protected]>
1 parent aa9811a commit 9c42cb0

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
- Added http 2 support.
6+
57
## [0.22.0] - 2025-10-03
68

79
- Added ability to continue on error, introducing new metadata columns and new configuration option

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The goal for HTTP TableLookup connector was to use it in Flink SQL statement as
1212

1313
Currently, HTTP source connector supports only Lookup Joins (TableLookup) [1] in Table/SQL API.
1414
`HttpSink` supports both Streaming API (when using [HttpSink](src/main/java/com/getindata/connectors/http/internal/sink/HttpSink.java) built using [HttpSinkBuilder](src/main/java/com/getindata/connectors/http/internal/sink/HttpSinkBuilder.java)) and the Table API (using connector created in [HttpDynamicTableSinkFactory](src/main/java/com/getindata/connectors/http/internal/table/HttpDynamicTableSinkFactory.java)).
15+
Note that the connector will work with both http 1.1 and http 2 endpoints.
1516

1617
## Updating the connector
1718
In case of updating http-connector please see [Breaking changes](#breaking-changes) section.

src/main/java/com/getindata/connectors/http/internal/sink/httpclient/BatchRequestSubmitter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private HttpRequest buildHttpRequest(List<HttpSinkRequestEntry> reqeustBatch, UR
124124
Builder requestBuilder = java.net.http.HttpRequest
125125
.newBuilder()
126126
.uri(endpointUri)
127-
.version(Version.HTTP_1_1)
127+
.version(Version.HTTP_2)
128128
.timeout(Duration.ofSeconds(httpRequestTimeOutSeconds))
129129
.method(method, publisher);
130130

src/main/java/com/getindata/connectors/http/internal/sink/httpclient/PerRequestSubmitter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private HttpRequest buildHttpRequest(HttpSinkRequestEntry requestEntry, URI endp
6262
Builder requestBuilder = java.net.http.HttpRequest
6363
.newBuilder()
6464
.uri(endpointUri)
65-
.version(Version.HTTP_1_1)
65+
.version(Version.HTTP_2)
6666
.timeout(Duration.ofSeconds(httpRequestTimeOutSeconds))
6767
.method(requestEntry.method,
6868
BodyPublishers.ofByteArray(requestEntry.element));

0 commit comments

Comments
 (0)