diff --git a/Pilz.Net/Api/ApiServer.cs b/Pilz.Net/Api/ApiServer.cs index ef9e358..62887ea 100644 --- a/Pilz.Net/Api/ApiServer.cs +++ b/Pilz.Net/Api/ApiServer.cs @@ -551,6 +551,8 @@ public class ApiServer : IApiServer objs.Add(Convert.ChangeType(HttpUtility.UrlDecode(parameterValue), info.ParameterType)); // or Uri.UnescapeDataString(); maybe run this line twice? else if (queryparams.AllKeys.FirstOrDefault(n => n != null && n.Equals(info.Name, StringComparison.InvariantCultureIgnoreCase)) is string querykey) objs.Add(Convert.ChangeType(HttpUtility.UrlDecode(queryparams.Get(querykey)), info.ParameterType)); + else if (info.HasDefaultValue) + objs.Add(info.DefaultValue); else objs.Add(null); } diff --git a/Pilz.Net/Pilz.Net.csproj b/Pilz.Net/Pilz.Net.csproj index bd586fb..ab951d6 100644 --- a/Pilz.Net/Pilz.Net.csproj +++ b/Pilz.Net/Pilz.Net.csproj @@ -8,7 +8,7 @@ - 2.6.8 + 2.6.9