featzhang opened a new pull request, #34: URL: https://github.com/apache/flink-connector-http/pull/34
## What is the purpose of the change This PR adds User-Agent configuration support to the HTTP connector, allowing users to customize the User-Agent header sent with HTTP requests for both sink and lookup operations. ## Brief change log - Added `http.source.lookup.user.agent` configuration option for lookup operations with default value "flink-http-connector" - Added `http.sink.user.agent` configuration option for sink operations with default value "flink-http-connector" - Modified `RequestFactoryBase` to apply User-Agent header to all lookup requests - Modified `JavaNetSinkHttpClient` to apply User-Agent header to all sink requests - Added unit tests for both sink and lookup User-Agent functionality ## Verifying this change This change added tests and can be verified as follows: - Added `JavaNetHttpPollingClientTest#shouldBuildClientWithUserAgent()` and `#shouldBuildClientWithCustomUserAgent()` to verify lookup User-Agent functionality - Added `JavaNetSinkHttpClientTest#shouldBuildClientWithUserAgent()` and `#shouldBuildClientWithCustomUserAgent()` to verify sink User-Agent functionality - All existing tests pass with the new configuration ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): No - The public API: Yes, adds new configuration options - The runtime per-record code paths: Yes, adds User-Agent header to requests - Anything that affects deployment or recovery: No ## Documentation - Does this pull request introduce a new feature: Yes - If yes, how is the feature documented: Notable additions to the code, documentation will be updated in a follow-up ## Notes The User-Agent header is automatically added to all HTTP requests with the default value "flink-http-connector". Users can customize this value through the configuration options. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
