This commit is contained in:
@@ -115,7 +115,7 @@ public async Task<IActionResult> GetSkolmat(int week, [FromQuery] string sensor
|
|||||||
{
|
{
|
||||||
var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3M2Q5ODIyYzU4ZWI0MjM4OWEyMGQ2MWQ2MWVhOWYzYyIsImlhdCI6MTc0OTE1MzY1MCwiZXhwIjoyMDY0NTEzNjUwfQ.8C_dKm7P1BbFVJKc_wT76YnQqiZxkP9EzrsLbfD0Ml8";
|
var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3M2Q5ODIyYzU4ZWI0MjM4OWEyMGQ2MWQ2MWVhOWYzYyIsImlhdCI6MTc0OTE1MzY1MCwiZXhwIjoyMDY0NTEzNjUwfQ.8C_dKm7P1BbFVJKc_wT76YnQqiZxkP9EzrsLbfD0Ml8";
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
client.BaseAddress = new Uri("http://192.168.1.196:8123/");
|
client.BaseAddress = new Uri("https://ha.zcz.se");
|
||||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
||||||
|
|
||||||
var res = await client.GetAsync($"/api/states/{sensor}");
|
var res = await client.GetAsync($"/api/states/{sensor}");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Aberwyn.Data
|
|||||||
private readonly HttpClient _http;
|
private readonly HttpClient _http;
|
||||||
private readonly string _url;
|
private readonly string _url;
|
||||||
private string _sessionId;
|
private string _sessionId;
|
||||||
//should fix settings password
|
//should fix settings passwor
|
||||||
public DelugeClient(HttpClient httpClient, string baseUrl = "http://192.168.10.7:8112/json")
|
public DelugeClient(HttpClient httpClient, string baseUrl = "http://192.168.10.7:8112/json")
|
||||||
{
|
{
|
||||||
_http = httpClient;
|
_http = httpClient;
|
||||||
|
|||||||
Reference in New Issue
Block a user