Salmon/Salmon.Service/Watchers/WebStatus.cs

19 lines
452 B
C#

using Salmon.Core;
namespace Salmon.Service.Watchers;
public class WebStatus
: Base
{
public string Method { get; set; } = "GET";
public string Uri { get; set; }
public override async Task<IEnumerable<Element>> ForgeElements()
{
List<Element> elements = new();
var ws = await Salmon.Model.Monitor.WebEndpoint.From(Uri, Method);
ApplyField(ws);
elements.Add(ws);
return elements;
}
}