Add HTTP(S) client using cURL
This commit is contained in:
Родитель
84c2946701
Коммит
370e955f22
|
@ -3,7 +3,7 @@
|
|||
|
||||
Property | C/P | Range | Default | Importance | Description
|
||||
-----------------------------------------|-----|-----------------|--------------:|------------| --------------------------
|
||||
builtin.features | * | | gzip, snappy, ssl, sasl, regex, lz4, sasl_gssapi, sasl_plain, sasl_scram, plugins, zstd, sasl_oauthbearer | low | Indicates the builtin features for this build of librdkafka. An application can either query this value or attempt to set it with its list of required features to check for library support. <br>*Type: CSV flags*
|
||||
builtin.features | * | | gzip, snappy, ssl, sasl, regex, lz4, sasl_gssapi, sasl_plain, sasl_scram, plugins, zstd, sasl_oauthbearer, http | low | Indicates the builtin features for this build of librdkafka. An application can either query this value or attempt to set it with its list of required features to check for library support. <br>*Type: CSV flags*
|
||||
client.id | * | | rdkafka | low | Client identifier. <br>*Type: string*
|
||||
metadata.broker.list | * | | | high | Initial list of brokers as a CSV list of broker host or host:port. The application may also use `rd_kafka_brokers_add()` to add brokers during runtime. <br>*Type: string*
|
||||
bootstrap.servers | * | | | high | Alias for `metadata.broker.list`: Initial list of brokers as a CSV list of broker host or host:port. The application may also use `rd_kafka_brokers_add()` to add brokers during runtime. <br>*Type: string*
|
||||
|
|
|
@ -341,6 +341,9 @@ int unittest_http (void) {
|
|||
}
|
||||
RD_UT_ASSERT(!empty, "Expected non-empty JSON response from %s",
|
||||
base_url);
|
||||
RD_UT_SAY("URL %s returned no error and a non-empty "
|
||||
"JSON object/array as expected",
|
||||
base_url);
|
||||
cJSON_Delete(json);
|
||||
|
||||
|
||||
|
@ -351,7 +354,7 @@ int unittest_http (void) {
|
|||
RD_UT_ASSERT(herr->code >= 400, "Expected get_json(%s) error code >= "
|
||||
"400, got %d", error_url, herr->code);
|
||||
RD_UT_SAY("Error URL %s returned code %d, errstr \"%s\" "
|
||||
"and %s JSON object",
|
||||
"and %s JSON object as expected",
|
||||
error_url, herr->code, herr->errstr,
|
||||
json ? "a" : "no");
|
||||
/* Check if there's a JSON document returned */
|
||||
|
|
|
@ -159,6 +159,12 @@ struct rd_kafka_property {
|
|||
#define _UNSUPPORTED_ZSTD .unsupported = "libzstd not available at build time"
|
||||
#endif
|
||||
|
||||
#if WITH_CURL
|
||||
#define _UNSUPPORTED_HTTP .unsupported = NULL
|
||||
#else
|
||||
#define _UNSUPPORTED_HTTP .unsupported = "libcurl not available at build time"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _UNSUPPORTED_WIN32_GSSAPI .unsupported = \
|
||||
"Kerberos keytabs are not supported on Windows, " \
|
||||
|
@ -328,6 +334,7 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
|
|||
},
|
||||
{ 0x400, "zstd", _UNSUPPORTED_ZSTD },
|
||||
{ 0x800, "sasl_oauthbearer", _UNSUPPORTED_SSL },
|
||||
{ 0x1000, "http", _UNSUPPORTED_HTTP },
|
||||
{ 0, NULL }
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче