Barcodes speichern
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user