Hello everyone,
is there possible to login this form via alternative code or web form ui?
string url = "http://40.87.141.219:1880/ui"; // Node-RED sunucu adresinizi ve port numarasını girin
string username = "user";
string password = "areytech";
using (HttpClient client = new HttpClient())
{
// Kullanıcı adı ve şifreyi Base64 ile kodlama
string base64Auth = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
// "Authorization" başlığını ekleyin
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64Auth);
// GET isteği oluşturun (örnek olarak)
HttpResponseMessage response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response: " + responseContent);
}
else
{
Console.WriteLine("Request failed with status code: " + response.StatusCode);
}
}
This is my login code but, always get fault,
what i try to do, if i make login with c# application, than there is no required to login again,
is it possible with basic auth?