piwigodotnet/PiwigoDotnet/Piwigo.Client/FlurlExtensions.cs

16 lines
449 B
C#
Raw Normal View History

using Flurl.Http.Content;
namespace Piwigo.Client;
internal static class FlurlExtensions
{
internal static CapturedMultipartContent AddMethod(this CapturedMultipartContent part, string piwigoMethod)
{
if (string.IsNullOrWhiteSpace(piwigoMethod))
{
throw new ArgumentException("Value cannot be null or whitespace.", nameof(piwigoMethod));
}
return part.AddString("method", piwigoMethod);
}
}