piwigodotnet/PiwigoDotnet/Piwigo.Client/FlurlExtensions.cs
2022-10-15 00:07:59 +02:00

16 lines
449 B
C#

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);
}
}