This commit is contained in:
2024-07-03 22:18:32 +02:00
Unverified
parent 4b333878b8
commit 008dcdf4ec
88 changed files with 3389 additions and 644 deletions

View File

@@ -0,0 +1,32 @@
using System.Diagnostics.CodeAnalysis;
using WatchIt.Common.Query;
namespace WatchIt.Common.Services.HttpClient;
public class HttpRequest
{
#region PROPERTIES
public required HttpMethodType MethodType { get; set; }
public required string Url { get; set; }
public QueryParameters? Query { get; set; }
public object? Body { get; set; }
public Dictionary<string, string> Headers { get; } = new Dictionary<string, string>();
public string FullUrl => $"{Url}{(Query is not null ? Query.ToString() : string.Empty)}";
#endregion
#region CONSTRUCTORS
[SetsRequiredMembers]
public HttpRequest(HttpMethodType methodType, string url)
{
MethodType = methodType;
Url = url;
}
#endregion
}