mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:47:21 +01:00
Merge pull request #18 from thattuys/support_http
Support downloading from http
This commit is contained in:
commit
5907202648
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using LZ4;
|
using LZ4;
|
||||||
|
|
@ -55,7 +56,7 @@ namespace MareSynchronos.WebAPI
|
||||||
wc.DownloadProgressChanged += progChanged;
|
wc.DownloadProgressChanged += progChanged;
|
||||||
|
|
||||||
string fileName = Path.GetTempFileName();
|
string fileName = Path.GetTempFileName();
|
||||||
var baseUri = new Uri(ApiUri.Replace("wss", "https"), UriKind.Absolute);
|
var baseUri = new Uri(Regex.Replace(ApiUri, "^ws", "http"), UriKind.Absolute);
|
||||||
var relativeUri = new Uri("cache/" + hash, UriKind.Relative);
|
var relativeUri = new Uri("cache/" + hash, UriKind.Relative);
|
||||||
var fileUri = new Uri(baseUri, relativeUri);
|
var fileUri = new Uri(baseUri, relativeUri);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue