Barcodes speichern

This commit is contained in:
2024-08-21 00:11:59 +02:00
parent a61aa38d24
commit 423e5f3cd2
12 changed files with 142 additions and 49 deletions

View File

@@ -2,6 +2,7 @@
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using ZXing.QrCode.Internal;
namespace Jugenddienst_Stunden.Models
{
@@ -14,6 +15,8 @@ namespace Jugenddienst_Stunden.Models
public static async Task<string> GetApiDataWithAuthAsync(string url, string token) {
using (HttpClient client = new HttpClient()) {
try {
client.DefaultRequestHeaders.Add("Accept", "application/json");
// Hinzufügen des Bearer-Tokens zum Authorization-Header
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);