Skip to content

Commit

Permalink
Fix get topics https schema (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
goflutterjava authored Dec 6, 2022
1 parent c1991b7 commit eba4afe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/api/pulsar/pulsar_partitioned_topic_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ class PulsarPartitionedTopicApi {
static Future<List<TopicResp>> getTopics(
int id, String host, int port, TlsContext tlsContext, String tenant, String namespace) async {
try {
var url = tlsContext.enableTls
? HttpUtil.https
: '${HttpUtil.http}$host:${port.toString()}/admin/v2/persistent/$tenant/$namespace/partitioned';
var url = '${tlsContext.getSchema()}$host:${port.toString()}/admin/v2/persistent/$tenant/$namespace/partitioned';
var response = await HttpUtil.getClient(tlsContext, SERVER.PULSAR, id).get<String>(url);
if (HttpUtil.abnormal(response.statusCode!)) {
log('ErrorCode is ${response.statusCode}, body is ${response.data}');
Expand Down

0 comments on commit eba4afe

Please sign in to comment.