Skip to content

Commit

Permalink
Group audit logs, ban list, invites, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Apr 23, 2024
1 parent d652460 commit 01cbb5f
Show file tree
Hide file tree
Showing 5 changed files with 1,249 additions and 208 deletions.
15 changes: 11 additions & 4 deletions Dotnet/ImageCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ public static async Task<string> GetImage(string url, string fileId, string vers
foreach (Cookie cookie in cookies)
cookieString += $"{cookie.Name}={cookie.Value};";
}

httpClient.DefaultRequestHeaders.Add("Cookie", cookieString);
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(Program.Version);
using (var response = await httpClient.GetAsync(url))

var request = new HttpRequestMessage(HttpMethod.Get, url)
{
Headers =
{
{ "Cookie", cookieString },
{ "User-Agent", Program.Version }
},

};
using (var response = await httpClient.SendAsync(request))
{
response.EnsureSuccessStatusCode();
await using (var fileStream = new FileStream(fileLocation, FileMode.Create, FileAccess.Write, FileShare.None))
Expand Down
Loading

0 comments on commit 01cbb5f

Please sign in to comment.