1
This commit is contained in:
22
Assets/BITKit/Unity/Scripts/Http/HttpAction.cs
Normal file
22
Assets/BITKit/Unity/Scripts/Http/HttpAction.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
// ReSharper disable UnassignedField.Local
|
||||
|
||||
namespace BITKit.Http
|
||||
{
|
||||
[Serializable]
|
||||
public class HttpAction : IAction
|
||||
{
|
||||
private static readonly HttpClient _httpClient = new();
|
||||
[SerializeReference, SubclassSelector] private IReference url;
|
||||
public void Execute()
|
||||
{
|
||||
_httpClient.GetAsync(url.Value).AsUniTask().Forget();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user