-
Notifications
You must be signed in to change notification settings - Fork 0
/
Interfaces.cs
36 lines (31 loc) · 950 Bytes
/
Interfaces.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ResumePDF
{
//internal interface IDocument
//{
// DocumentMetadata GetMetadata();
// void Compose(IDocumentContainer container);
//}
//internal interface IComponent
//{
// void Compose(IContainer container);
//}
public static class HttpHelper
{
private static readonly HttpClient _httpClient = new HttpClient();
public static async Task<byte[]> DownloadFileAsync(string uri)
{
Uri? uriResult;
if (!Uri.TryCreate(uri, UriKind.Absolute, out uriResult))
throw new InvalidOperationException("URI is invalid.");
return await _httpClient.GetByteArrayAsync(uri);
//File.WriteAllBytes(outputPath, fileBytes);
}
}
}