File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,27 @@ CREATE TABLE http (
266266#### Single submission mode
267267In this mode every processed event is submitted as individual HTTP POST/PUT request.
268268
269+ Streaming API:
270+ ``` java
271+ HttpSink . < String > builder()
272+ .setEndpointUrl(" http://example.com/myendpoint" )
273+ .setElementConverter(
274+ (s, _context) - > new HttpSinkRequestEntry (" POST" , s. getBytes(StandardCharsets . UTF_8 )))
275+ .setProperty(" gid.connector.http.sink.writer.request.mode" , " single" )
276+ .build();
277+ ```
278+ SQL:
279+ ``` roomsql
280+ CREATE TABLE http (
281+ id bigint,
282+ some_field string
283+ ) WITH (
284+ 'connector' = 'http-sink',
285+ 'url' = 'http://example.com/myendpoint',
286+ 'format' = 'json',
287+ 'gid.connector.http.sink.writer.request.mode' = 'single'
288+ )
289+ ```
269290
270291#### Http headers
271292It is possible to set HTTP headers that will be added to HTTP request send by sink connector.
You can’t perform that action at this time.
0 commit comments