mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
Fix bug
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
@@ -21,7 +22,10 @@ namespace yaflay.ru.Новая_папка
|
|||||||
HttpClient client = new();
|
HttpClient client = new();
|
||||||
HttpResponseMessage getter = await client.GetAsync("https://raw.githubusercontent.com/YaFlay/yaflay.ru/master/redirect_uris.json");
|
HttpResponseMessage getter = await client.GetAsync("https://raw.githubusercontent.com/YaFlay/yaflay.ru/master/redirect_uris.json");
|
||||||
await Console.Out.WriteLineAsync(await getter.Content.ReadAsStringAsync());
|
await Console.Out.WriteLineAsync(await getter.Content.ReadAsStringAsync());
|
||||||
JsonNode allFile = JsonNode.Parse(await getter.Content.ReadAsStringAsync());
|
JsonNodeOptions jsonNodeOptions = new ();
|
||||||
|
JsonDocumentOptions jsonDocumentOptions = new();
|
||||||
|
jsonDocumentOptions.AllowTrailingCommas = true;
|
||||||
|
JsonNode allFile = JsonNode.Parse(await getter.Content.ReadAsStringAsync(), jsonNodeOptions, jsonDocumentOptions);
|
||||||
return (string?)allFile[baseUrl];
|
return (string?)allFile[baseUrl];
|
||||||
}
|
}
|
||||||
catch (Exception except)
|
catch (Exception except)
|
||||||
|
|||||||
Reference in New Issue
Block a user