|
|
|
@ -7,6 +7,8 @@ using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using System.Net.Http.Headers;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
@ -85,6 +87,9 @@ namespace Kafka2Doris
|
|
|
|
|
if(list.Count>0)
|
|
|
|
|
{
|
|
|
|
|
var httpClient = this._httpClientFactory.CreateClient();
|
|
|
|
|
var username = _config.GetValue("username", "root");
|
|
|
|
|
var password = _config.GetValue("password", "aA123456!");
|
|
|
|
|
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}")));
|
|
|
|
|
httpClient.DefaultRequestHeaders.Add("label", DateTime.Now.ToString());
|
|
|
|
|
var url = $"{_config.GetValue("doris","http://localhost:8030")}/api/example/User/_stream_load";
|
|
|
|
|
using (var multiContent = new MultipartFormDataContent())
|
|
|
|
|