add passkey functionality
This commit is contained in:
@@ -3,12 +3,14 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
@@ -206,6 +208,17 @@ namespace Oqtane.Services
|
||||
await CheckResponse(response, uri);
|
||||
}
|
||||
|
||||
protected async Task<string> PostStringAsync(string uri)
|
||||
{
|
||||
var response = await GetHttpClient().PostAsync(uri, null);
|
||||
if (await CheckResponse(response, uri) && ValidateJsonContent(response.Content))
|
||||
{
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
return result;
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
protected async Task<T> PostJsonAsync<T>(string uri, T value)
|
||||
{
|
||||
return await PostJsonAsync<T, T>(uri, value);
|
||||
|
||||
Reference in New Issue
Block a user