CAMEL-18506: replaced Async HTTP client with Java's own HTTP client in (#190)

camel-telegram
diff --git a/catalog/camel-catalog-provider-karaf/src/main/resources/org/apache/camel/catalog/karaf/components/telegram.json b/catalog/camel-catalog-provider-karaf/src/main/resources/org/apache/camel/catalog/karaf/components/telegram.json
index b7f172a..9bf97a8 100644
--- a/catalog/camel-catalog-provider-karaf/src/main/resources/org/apache/camel/catalog/karaf/components/telegram.json
+++ b/catalog/camel-catalog-provider-karaf/src/main/resources/org/apache/camel/catalog/karaf/components/telegram.json
@@ -26,8 +26,7 @@
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
     "baseUri": { "kind": "property", "displayName": "Base Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https:\/\/api.telegram.org", "description": "Can be used to set an alternative base URI, e.g. when you want to test the component against a mock Telegram API" },
-    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.asynchttpclient.AsyncHttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom AsyncHttpClient" },
-    "clientConfig": { "kind": "property", "displayName": "Client Config", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.asynchttpclient.AsyncHttpClientConfig", "deprecated": false, "autowired": false, "secret": false, "description": "To configure the AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig instance." },
+    "client": { "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.net.http.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom java.net.http.HttpClient" },
     "authorizationToken": { "kind": "property", "displayName": "Authorization Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The default Telegram authorization token to be used when the information is not provided in the endpoints." }
   },
   "headers": {
@@ -50,8 +49,8 @@
     "chatId": { "kind": "parameter", "displayName": "Chat Id", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.telegram.TelegramConfiguration", "configurationField": "configuration", "description": "The identifier of the chat that will receive the produced messages. Chat ids can be first obtained from incoming messages (eg. when a telegram user starts a conversation with a bot, its client sends automatically a '\/start' message containing the chat id). It is an optional parameter, as the chat id can be set dynamically for each outgoing message (using body or headers)." },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
     "baseUri": { "kind": "parameter", "displayName": "Base Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.telegram.TelegramConfiguration", "configurationField": "configuration", "description": "Can be used to set an alternative base URI, e.g. when you want to test the component against a mock Telegram API" },
-    "bufferSize": { "kind": "parameter", "displayName": "Buffer Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 4096, "description": "The initial in-memory buffer size used when transferring data between Camel and AHC Client." },
-    "clientConfig": { "kind": "parameter", "displayName": "Client Config", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.asynchttpclient.AsyncHttpClientConfig", "deprecated": false, "autowired": false, "secret": false, "description": "To configure the AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig instance." },
+    "bufferSize": { "kind": "parameter", "displayName": "Buffer Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1048576, "description": "The initial in-memory buffer size used when transferring data between Camel and AHC Client." },
+    "client": { "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.net.http.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpClient" },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.telegram.TelegramConfiguration", "configurationField": "configuration", "description": "HTTP proxy host which could be used when sending out the message." },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.telegram.TelegramConfiguration", "configurationField": "configuration", "description": "HTTP proxy port which could be used when sending out the message." },
     "proxyType": { "kind": "parameter", "displayName": "Proxy Type", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "org.apache.camel.component.telegram.TelegramProxyType", "enum": [ "HTTP", "SOCKS4", "SOCKS5" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTP", "configurationClass": "org.apache.camel.component.telegram.TelegramConfiguration", "configurationField": "configuration", "description": "HTTP proxy type which could be used when sending out the message." },