[connector-http] 支持自定义 HTTP headers via ConfigOption#32
Open
featzhang wants to merge 2 commits intoapache:mainfrom
Open
[connector-http] 支持自定义 HTTP headers via ConfigOption#32featzhang wants to merge 2 commits intoapache:mainfrom
featzhang wants to merge 2 commits intoapache:mainfrom
Conversation
Add formal ConfigOption definitions for custom HTTP headers in both the HTTP lookup source and HTTP dynamic sink connectors. Previously, custom HTTP headers were only configurable via raw properties using the prefixes 'http.source.lookup.header.' and 'http.sink.header.', but these were not declared as official ConfigOptions. This meant no IDE autocomplete support, missing documentation, and unclear user guidance. Changes: - Add SOURCE_LOOKUP_HEADERS ConfigOption (Map type) to HttpLookupConnectorOptions with prefix 'http.source.lookup.header' - Add SINK_HEADERS ConfigOption (Map type) to HttpDynamicSinkConnectorOptions with prefix 'http.sink.header' - Register both options in the respective factory's optionalOptions() so Flink's table option validator recognizes them - Add tests verifying custom headers can be specified in SQL DDL without triggering ValidationException The header values are still passed through Properties and read by the existing HttpHeaderUtils.prepareHeaderMap() mechanism, so the runtime behavior is unchanged. The new ConfigOptions serve primarily as documentation and validation anchors.
Add documentation for the formal ConfigOption support of custom HTTP headers (http.source.lookup.header.* and http.sink.header.*) introduced in FLINK-HTTP-3. Changes: - Add http.source.lookup.header.* entry to Lookup Source Connector Options table - Update Http headers section for Lookup Source to note formal ConfigOption support - Add http.sink.header.* entry to Sink Connector Options table - Add new 'Sink Http headers' section with SQL DDL example - Update TOC to include new Sink Http headers section - Apply same changes to both English and Chinese documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add formal ConfigOption definitions for custom HTTP headers in both the HTTP lookup source and HTTP dynamic sink connectors.
Previously, custom HTTP headers were only configurable via raw properties using the prefixes 'http.source.lookup.header.' and 'http.sink.header.', but these were not declared as official ConfigOptions. This meant no IDE autocomplete support, missing documentation, and unclear user guidance.
Changes:
The header values are still passed through Properties and read by the existing HttpHeaderUtils.prepareHeaderMap() mechanism, so the runtime behavior is unchanged. The new ConfigOptions serve primarily as documentation and validation anchors.