featzhang commented on code in PR #34:
URL: 
https://github.com/apache/flink-connector-http/pull/34#discussion_r3015312295


##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/sink/httpclient/JavaNetSinkHttpClient.java:
##########
@@ -73,6 +73,12 @@ public JavaNetSinkHttpClient(
                         properties,
                         headerPreprocessor);
 
+        // Add User-Agent header if configured

Review Comment:
   You're right that the existing prefix mechanism already works:
   
     'http.source.lookup.header.User-Agent' = 'my-agent/1.0'
     'http.sink.header.User-Agent'          = 'my-agent/1.0'
   
     The main motivation for a dedicated option is the default value — without 
any configuration today, the connector sends requests with no User-Agent header
     at all. Many HTTP servers use User-Agent for logging and traffic 
attribution, so having the connector identify itself as flink-http-connector 
out of the
     box seems useful without requiring every user to set it explicitly.
     A secondary benefit is discoverability: a named ConfigOption appears in 
documentation and tooling, whereas the prefix-based keys are not enumerated 
anywhere.



-- 
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]

Reply via email to